| |
|
|
|
|
|
x = 2+3you should get the result as :
y= x * 5;
z=x^y
octave> x = 2+3You are allowed to use standard math constants like pi, e, true, false, etc. in your formulaes.
x = 5
octave> y= x * 5;
octave> z=x^y
z = 2.9802e+17
octave> b = [ 3; 5; 1 ]
b =
3
5
1
octave> A = [ 1, 1, 2; 3, 5, 8; 13, 21, 34 ]
A =
1 1 2
3 5 8
13 21 34
octave> A'
ans =
1 3 13
1 5 21
2 8 34
To solve the set of linear equations ax
= b,
use the left division operator, `\':
A \ bThe code above will produce in output the solvation of the linear equation
octave> A / b
ans =
0.28571
1.20000
5.08571
3 + 4i
3.0 + 4.0i
0.3e1 + 40e-1i
sqrt (x^2 + y^2)to check Pitagoras theorem :)
...) -
compute the greatest common divisor c(x) = c(1) * x^n + ... + c(n) x + c(n+1)
| Terms of use | Contact us. We are very interested in ideas for new tools and bugs in existing. | About us |