comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Math Question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Math Question [message #51101 is a reply to message #51099] Mon, 30 October 2006 12:17 Go to previous messageGo to previous message
Jo Klein is currently offline  Jo Klein
Messages: 54
Registered: January 2006
Member
> Just out of curiosity, has anyone tried this on Matlab? I'd expect the
> same (or similar) results, but it'd be interesting if they weren't.
Matlab returns the real part of the argument if it's a real number you
put in:
>> -0.1^2.0

ans =
-0.0100

>> -0.1^2.01
ans =
-0.0098

>> complex(-0.1,0)^2.01
ans =
0.0098 + 0.0003i
Hmm - I don't know if this is more desirable than IDL's behaviour, I
think it's fair enough to warn people who try to do something like that
with their data. In Matlab, try and invert the second operation ... this
can't be good. Suppose there are arguments for both approaches.
Jo
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Determining a safe variable name from a string
Next Topic: overlaying arrow plots

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 23:08:11 PDT 2025

Total time taken to generate the page: 2.23872 seconds