GNU Octave, version 4.0.0
Copyright (C) 2015 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type 'warranty'.
Octave was configured for "i686-w64-mingw32".
Please contribute if you find this software useful.
For information about changes from previous versions, type 'news'.
>> A=[1,2,1,1,212,1000]
A =
1 2 1 1 212 1000
>> B= rand(3,2)
B =
0.58139 0.52678
0.60398 0.34393
0.49790 0.32606
>> C=1(3,2)
error: A(I,J): row index out of bounds; value 3 out of bound 1
>> C=0.9(3,2)
error: A(I,J): row index out of bounds; value 3 out of bound 1
>> C=(3,2)
parse error:
syntax error
>>> C=(3,2)
^
>> 2 * A
ans =
2 4 2 2 424 2000
>> 4.5 * A
ans =
4.5000 9.0000 4.5000 4.5000 954.0000 4500.0000
>> 0.6944 * A ^ 0.5
error: for A^b, A must be a square matrix. Use .^ for elementwise power.
>> 0.6944 * A
ans =
0.69440 1.38880 0.69440 0.69440 147.21280 694.40000
>>
>> x = A \ b
error: 'b' undefined near line 1 column 9
>>
>> x = A \ b
error: 'b' undefined near line 1 column 9
>> x = A \ B
error: operator \: nonconformant arguments (op1 is 1x6, op2 is 3x2)
>> a = rand(3,3)
a =
0.824214 0.029893 0.542378
0.668594 0.111037 0.547211
0.499944 0.341851 0.948776
>> b = rand(3,4)
b =
0.26867 0.98889 0.48521 0.44561
0.45460 0.20859 0.44251 0.30262
0.38680 0.32572 0.91684 0.82033
>> x = b \ a
x =
1.3559534 -0.0752192 0.4586538
0.5842781 -0.1827420 0.0082588
0.0916040 0.2354118 0.5122098
-0.3642875 0.2616426 0.3645640
>>
I cannot figure out how matrix division is working out
i.e. 0.26867 divided by 1 / 0.82414 not equal to 1.3559534
Further reading
1. Maths Is Fun
2. Gnu.org Octave documentation/tutorial
--
Jonathan Camilleri
Mobile (MT): ++356 7982 7113
E-mail:
address@hiddenPlease consider your environmental responsibility before printing this e-mail.