Help

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

Help

Orlando Cerrutti

I do not understand why I have this error message, thanks for your help

 

Orlando.

 

>> X={1,2;3,4}

X =

{

  [1,1] =  1

  [2,1] =  3

  [1,2] =  2

  [2,2] =  4

}

 

>> Y=X'*X

error: binary operator '*' not implemented for 'cell' by 'cell' operations

>> 

 

 

 

      

 



Reply | Threaded
Open this post in threaded view
|

Re: Help

Thomas D. Dean-2
On 7/30/19 10:17 AM, Orlando Cerrutti wrote:

> I do not understand why I have this error message, thanks for your help
>
> Orlando.
>
>  >> X={1,2;3,4}
>
> X =
>
> {
>
>    [1,1] =  1
>
>    [2,1] =  3
>
>    [1,2] =  2
>
>    [2,2] =  4
>
> }
>
>  >> Y=X'*X
>
> error: binary operator '*' not implemented for 'cell' by 'cell' operations
>
>  >>
>
>
>

The error message is correct.  '{' and '}' delimit cell data.

I believe you want to use '[' and ']'

X = [1, 2; 3, 4]