Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
hi everyone, i have a problem in drawing the graph, i don't know why it's wrong
i want to draw the graph same as the second picture but as you see in the first picture, the graph has error.
Here is the program
i attach the zip file in post . Thank you so much !
Solved! Go to Solution.
Hi,
"Thank you , but can i ask you that why it is V.fl(k)1 and not is V.fl(k) in the graph, i don't know ."
The programming for Z(k) does not have a specific return statement. The program automatically returns Z which is a two column vector as the last thing returned is an element of Z. If you specifically "return" the first term of Z you only get one answer for Z.
I have done that in the enclosed sheet
Mathcad will not plot complex numbers.
Your program uses a lot of complex numbers. I would not be surprised if Z(k) contains a lot of complex numbers as a result. In fact your program is prepared ( in its last line) to let the result with index 1 become it's real part.
Find a way to treat those complex results. Either plot just the real part of the x and y- values (so plot Re(g(k)) versus Re(Vfl(k)).
Or plot the magnitude of the complex numbers.
Whichever makes more sense to your application.
Success!
Luc
Your function Z returns a 2-element vector, not a scalar. Thats the main reason for the error.
Maybe this helps, even though the plot looks different from the one you try to duplicate:
Hi,
Perhaps if you supply the background information we can check your implimentation of the mathematics behind the graph
Cheers
Terry
i attach the zip file in post. Thank you very much!. Iam a beginner in mathcad so something is overcome my understanding .
@terryhendicott wrote:
Hi,
Perhaps if you supply the background information we can check your implimentation of the mathematics behind the graph
Cheers
Terry
Thank you , but can i ask you that why it is V.fl(k)1 and not is V.fl(k) in the graph, i don't know .
Hi,
"Thank you , but can i ask you that why it is V.fl(k)1 and not is V.fl(k) in the graph, i don't know ."
The programming for Z(k) does not have a specific return statement. The program automatically returns Z which is a two column vector as the last thing returned is an element of Z. If you specifically "return" the first term of Z you only get one answer for Z.
I have done that in the enclosed sheet
Your knowledge in mathcad is so extensive, iam reading your explanation, i hope i can understand it . Thank you so much !
@terryhendicott wrote:
The programming for Z(k) does not have a specific return statement.
It will be good if each Mathcad-program has the return operator!
Better for the understanding!