MAtrix operations in Windows

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MAtrix operations in Windows

Dick Pierce
Just installed 3.6.4 using Octave3.6.4_gcc4.6.2_20130408.7z,
but have same issues with 3.6.2 installed from
octave-3.6.2-vs2010-setup.exe.

Trying the most basic matrix operations:

   octave:2> version
   ans = 3.6.4
   octave:3> a = { 1,2,3 }
   a =
   {
     [1,1] =  1
     [1,2] =  2
     [1,3] =  3
   }
   octave:4> b = { 4,5,6 }
   b =
   {
     [1,1] =  4
     [1,2] =  5
     [1,3] =  6
   }
   octave:5> a * b
   error: binary operator '*' not implemented for 'cell' by 'cell'
          operations
   octave:5> 2 * a
   error: binary operator '*' not implemented for 'scalar' by 'cell'
          operations
   octave:5>

This REALLY seems like pilot error, yet I was following examples
in the manual, and have not gotten beyond this point.

Can anyone suggest what's wrong and how to fix it?

--
+--------------------------------+
+         Dick Pierce            |
+ Professional Audio Development |
+--------------------------------+
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: MAtrix operations in Windows

martin_helm
Use [] instead of {} for matrices.

This is a matrix
a = [1 2 3]
b = [1 2 3; 4 5 6]

this is not a matrix but a cell array
c = {1 2 3}
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: MAtrix operations in Windows

Dick Pierce
Martin Helm wrote:
> Use [] instead of {} for matrices.
>
> This is a matrix
> a = [1 2 3]
> b = [1 2 3; 4 5 6]
>
> this is not a matrix but a cell array
> c = {1 2 3}


Yeah, like I thought, pilot error. Need to change
those reading glasses! :-)

Thanks muchly.

--
+--------------------------------+
+         Dick Pierce            |
+ Professional Audio Development |
+--------------------------------+
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave