Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

flat6

macrumors regular
Original poster
Oct 24, 2004
244
0
Yeah, I'll preface this has nothing to do with OSX or Macs; I'm just bad at Mathematica (which is technically running on my Mac :) ) and need help, and the good folks on these boards have always come through for me for other issues, so I figure I'd ask:

Why is my Abs[] command not working? I've still got imaginary numbers in the final expression, as if the command didn't execute at all. See attached image.
 

Attachments

  • deba.png
    deba.png
    29.1 KB · Views: 90
Warning: I can barely keep my head above water with Mathematica.

That said...

It's not clear to me why you have two output lines -- I'm assuming that one is supposed to give the "reflectance" and the next, the absolute value of that. I'm guessing that you want the polar form of the absolute value.

That second output technically is an absolute value, since it's output in the "exact" form of Abs[arg]. It seems to me that Mathematica is trying to give you an exact answer and it doesn't think that a machine-precision answer is good enough.

Maybe if you asked for an approximation? N[%]? That would at least tell you whether Mathematica was complaining about the accuracy -- if so N[] should give you an approximation.

That's all I've got -- Good Luck! :)
 
Ooops, I'm a dumbass, I wrote "i" instead of "I" for some of the first 4 expressions. (That is, I was telling Mathematica 'variable i' instead of 'imaginary number I'.)

Now that I fixed that it, it works [see attached]. Thanks for chiming in though, idea_hamster! I'm sure I'll run into more problems in a few minutes, so I'll revive this thread momentarily.
 

Attachments

  • deba2.png
    deba2.png
    23.6 KB · Views: 91
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.