|
From: | Jonathan Camilleri |
Subject: | Re: binary operators not implemented for 'cell' by 'scalar' operations |
Date: | Tue, 24 Nov 2015 10:03:59 +0100 |
On 24/11/2015 09:56, Jonathan Camilleri wrote:
I thought I could do matrix multiplications and the mathematical> >> m2 = m1.*0.2
operators, but evidently I cannot.
See
https://en.wikipedia.org/wiki/Operation_(mathematics)
https://en.wikipedia.org/wiki/Algebra
https://en.wikipedia.org/wiki/Order_of_operations
m1 = {1 1; 2 4; 4 8; 3 6}
m1 =
{
[1,1] = 1
[2,1] = 2
[3,1] = 4
[4,1] = 3
[1,2] = 1
[2,2] = 4
[3,2] = 8
[4,2] = 6
}
> error: binary operator '.*' not implemented for 'cell' by 'scalar'
m1 is not a Matrix.
May be you were looking for
octave:1> m1 = [1 1; 2 4; 4 8; 3 6]
m1 =
1 1
2 4
4 8
3 6
octave:2> m2 = m1.*0.2
m2 =
0.20000 0.20000
0.40000 0.80000
0.80000 1.60000
0.60000 1.20000
_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave
[Prev in Thread] | Current Thread | [Next in Thread] |