Error using ==> abs

Error using ==> abs

Post by dderijke » Thu, 21 Nov 2002 01:52:02



I have  the problem with function abs as follow:
Quote:>A1

A1 =

   0.0072 + 0.0071i
  -0.0079 - 0.0058i
   0.0045 + 0.0037i
  -0.0004 - 0.0039i
  -0.0017 + 0.0047i
   0.0020 - 0.0043i
  -0.0015 + 0.0030i
   0.0008 - 0.0003i
  -0.0018 - 0.0016i
   0.0017 + 0.0008i

Quote:>abs(A1)

??? Error using ==> abs
Function 'abs' is not defined for values of class 'single'.

How can i get the  abs of this A1...
This must be a columm with ten element ??
Thanks...

 
 
 

Error using ==> abs

Post by Dan Hensle » Thu, 21 Nov 2002 02:14:57



> I have  the problem with function abs as follow:
>>A1
> A1 =

>    0.0072 + 0.0071i
>   -0.0079 - 0.0058i
>    0.0045 + 0.0037i
>   -0.0004 - 0.0039i
>   -0.0017 + 0.0047i
>    0.0020 - 0.0043i
>   -0.0015 + 0.0030i
>    0.0008 - 0.0003i
>   -0.0018 - 0.0016i
>    0.0017 + 0.0008i
>>abs(A1)

> ??? Error using ==> abs
> Function 'abs' is not defined for values of class 'single'.

> How can i get the  abs of this A1...
> This must be a columm with ten element ??
> Thanks...

The error message should give you a hint.  A1 is of type 'single', and the
function 'abs' is not defined for 'single'.  Try this:

abs(double(A1))

Dan

 
 
 

Error using ==> abs

Post by dderijke » Thu, 21 Nov 2002 04:01:39


On Tue, 19 Nov 2002 17:14:57 GMT, "Dan Hensley"


>The error message should give you a hint.  A1 is of type 'single', and the
>function 'abs' is not defined for 'single'.  Try this:

>abs(double(A1))

>Dan

Wow ...Thanks a lot for for you help ...
I understand the problem by now ...
I'm just a newbie ...
Thanks,
have a nice day,