Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to plot the magnitude complex function (f) with respect to w. For some reason, Plot is just displaying a set of axes, with no points. Any Idea what's going on here?

z02 = 50*2^.5
z01 = 50
z1 = 100
zin = z02*(zl + \[ImaginaryJ]*z02*tan (w))/(z02 + \[ImaginaryJ]*zl*tan (w))
gamma = (zin - z01)/(zin + z01)
f = abs[gamma]

Plot[abs[gamma], {w, 0, 6.28}]

Thanks!

share|improve this question

closed as off-topic by Simon Woods, Mike Honeychurch, Yves Klett, m_goldberg, rm -rf Feb 7 at 15:24

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Simon Woods, Mike Honeychurch, Yves Klett, m_goldberg, rm -rf
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

There are a number of syntax errors. These include:

  • tan w should be Tan[w]
  • abs should be Abs

Just using output 124 as the basis of the desired function whose modulus you wish to plot:

g[w_] := (-50 + (70.7107 (100 + (0. + 70.7107 I) Tan [w]))/(70.7107 + 
       100 I Tan [
         w]))/(50 + (70.7107 (100 + (0. + 70.7107 I) Tan[
           w]))/(70.7107 + 100 I Tan [w]))

Plotting:

Plot[Abs@g[x], {x, 0, 6.28}]

yields:

enter image description here

share|improve this answer
    
@ubodqn: FML - was typing mine - OP also has mixed vars. I'll delete mine if you want... –  rasher Feb 7 at 6:57
    
@rasher no don't delete...you went to the effort of modifying original post (I believe)...we are just making the same point in slightly different ways –  ubpdqn Feb 7 at 7:04
    
+1 for answer, and coolness ;-) –  rasher Feb 7 at 7:05
z02 = 50*2^.5
z01 = 50
z1 = 100
zin = z02*(z1 + \[ImaginaryJ]*z02*Tan [w])/(z02 + \[ImaginaryJ]*z1*
      Tan [w])
gamma = (zin - z01)/(zin + z01)
f := Abs[gamma]

Plot[Abs[gamma], {w, 0, 6.28}]

Note, you had z1 and zl (one vs lowercase L), and two functions incorrect.

share|improve this answer
    
@rasher...the edit of the original post was very instructive...very helpful...I assume OP aims to f will be used for something,e.g. Plot[f,{w, 0, 6.28}] –  ubpdqn Feb 7 at 7:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.