|
"Sandra " <smh31.nospam@sussex.ac.uk> wrote in message
<g69nj3$9he$1@fred.mathworks.com>...
> I am sure this must be a simple thing, but it is doing my
> head in!!! imag and real don't work for me see below:
>
> >> real(0.0116 + 0.3333i)
> ??? Subscript indices must either be real positive integers
> or logicals.
>
> >> real(2+3*i)
> ??? Subscript indices must either be real positive integers
> or logicals.
>
> >> imag(2+3*i)
> ??? Subscript indices must either be real positive integers
> or logicals.
>
>
> the last two are from the matlab example! what am I doing wrong?
>
> any advice appreciated,
> sandra
Every single new user does this. They create
a variable with the name of a function they
will later use.
Have you created variables named imag and
real? What should Matlab do when it sees
variables with that name, but you try to use
the functions of the same names?
Just for kicks, now create variables named
quit and exit, as well as clear. Make your life
interesting. ;-)
John
|