Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Dear Mathcad fans,
So I am still discovering the functionalities of Mathcad Prime 2.0 and I have some trouble getting reasonable results.
I have a function Z representing the electrical impedance of a parallel LC circuit which varies with the frequency f. I tried to plot Z for the given frequency range (1 MHz < f < 2700 MHz) but without success.
I would be very happy if you look at my worksheet and tell me what is done wrong.
P.S.Please note tha that Z can only take pure imaginary values (has no real part).
Thanks
Solved! Go to Solution.
Thank you guys for the solutions. I see that plotting with Mathcad prime is a little bit tricky.
@Norm: Your solution is really elegant and tricky. I searched the help for fillseq but didn't find anything. can you please write some words about this function? How did you get the right hand side of the assignment and what is a? What is the arrow above the Z expression?
@Alan: Your solution is simple and efficient. I wondered how Mathcad didn't signal an error when you used f in the Z expression without defining it before? Why not simply write f:=1..2700 MHz and plot Z(f) (I know it doesn't work but why)?
By the way: is there any possibility to tell mathcad that f should have only real values? (because when I use the solve block for f I get complex values with very small imaginary part).
John Doe wrote:
Why not simply write f:=1..2700 MHz and plot Z(f) (I know it doesn't work but why)?
You could write something like: f:=1MHz,10MHz..2700MHz. Then remove the subscripts from the f's that appear in both arguments on the graph. That will work. Personally, I don't like using range variables like this, I prefer to use standard variables as in the worksheet I attached previously.
. I wondered how Mathcad didn't signal an error when you used f in the Z expression without defining it before?
f is a dummy argument. The statement Z(f):= etc defines Z as a function of f. The value of f only matters when the function is called.
By the way: is there any possibility to tell mathcad that f should have only real values? (because when I use the solve block for f I get complex values with very small imaginary part).
Don't understand what you are saying here! You specify the values of f, and they're all real. You are solving for Z and its values are all imaginary.
Incidentally, Norm's fillseq isn't an inbuilt Mathcad function, but one that Norm defines in the worksheet. Go to the Programming tab on the ribbon and select the vertical line there to start creating your own. Go to Getting Started/ Tutorial/ Programming Tutorial to learn more.
Alan
Alan is correct. I defined this function/program in this worksheet. Something found from the many contributions on the collab. There are other similar programs that can take the contents of a range variable and make it a vector ("ravel" is one example)
The arrow is the vectoize operator that I used more out of habit this time. Your "Z" definition may also work without it. If using more than one vector, the vectorize operator keeps an order when performing the calculation.
Type "f=" next to or below the definition of "f" and the one column maxtrix with 2700 rows, etc... vector will be visualized.
I hope this information is helpful.
Norm