help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

missing something obvious?


From: Dimitri Maziuk
Subject: missing something obvious?
Date: Thu, 15 Nov 2012 18:27:40 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.10) Gecko/20121030 Thunderbird/10.0.10

Hi everyone,

(First, disclaimer: I don't know octave. Or matlab. I've little to no
idea what I'm doing.)

------------------------------------------------
printf( "x is a %s\n", typeinfo( S(j).CA.C ) );
if( iscell( S(j).CA.C ) )
    x = S(j).CA.C{1};
else
    x = S(j).CA.C;
end

printf( "y is a %s\n", typeinfo( S(j).CB.C ) );
if( iscell( S(j).CB.C ) )
    y = S(j).CB.C {1};
else
    y = S(j).CB.C;
end
printf( "\nX=" );
disp( x );
printf( "\nY=" );
disp( y );
disp( (x + y) );
-------------------------------------------------

The output is

-------------------------------------------------
x is a cell
y is a cell

X=-100

Y=
{
  [1,1] = -100
}
error: binary operator `+' not implemented for `scalar' by `cell' operations
error: evaluating argument list element number 1
--------------------------------------------------

What am I missing?

Thanks in advance,
-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]