cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Real Solution of an Equation and Plot it

ygupta
12-Amethyst

Real Solution of an Equation and Plot it

Hello Friends,

I want to know the solution of the given below equation using Mathcad Prime 3.1.

In above equation, two variable i.e. Phi. & Zeta is given but need to find out Psi.

There is a figure given for reference which tells the relation in these variable as attache herein post.

 

Can anyone tell me how to calculate Psi using the given references and also if I need to plot it, then how can it be achived.

 

Thanks, Yogesh

40 REPLIES 40
Werner_E
25-Diamond I
(To:ygupta)

Glad you are up and running.

The function Ft is defined in a strange way with those return statements as factors and obviously does not yield the correct results for n>1 (always 0).

You may consider replacing it with something like this:

B.png

ygupta
12-Amethyst
(To:Werner_E)

Hi @Werner_E, Thanks for the pointing out. I made these changes.

 

Cheers !!

ygupta
12-Amethyst
(To:LucMeekes)

Hi Friends,

I did not notice it earlier but the plot we have done using your methods is somewhat a bit different than my original snap (as per IEC). 

Capture.JPGCapture1.JPG

Addtionally, I'd be interested to know that when we use logspace function for zeta then only these lines are plotted else only points. So what is other way to achieve the same thing because when I use the zeta variable down the plot it converts into the matrices.

 

Thanks for your help.

LucMeekes
23-Emerald III
(To:ygupta)

What, do you consider, is the difference between those two plots?

{I see that one uses mulitiple colours for its traces, but it has no grid and a wider horizontal range than the other that does have a grid, but only black and white colours....}

 

Considering zeta:

At the very top of your sheet, you have zeta defined as a constant with value of 0.159.

Below the function definition and above the plot, zeta is (re-)defined as being a vector using the logspace function. Being registered on this forum since 2015, I should assume that you know how Mathcad and Prime work: A variable, once defined with a value, has that value and can be used with that value to the right and below its definition until it is redefined.

If you need zeta to take on another value below the plot, just redefine it.

ygupta
12-Amethyst
(To:LucMeekes)

Hi Friends,

My bad and I'm sorry about that. I was just wondering if other than defining zeta as vector by logspace, is there another way to get the same output. I totaly agreed with your assumptions and I am aware with how does Mathcad prime works top to bottom.

 

In very first answer, posted by terrihendicott, he did this using unifspace function which is actually I did not understand. That was my main reason to ask here about the alternatives but sorry if its too much basic thing.

 

Thanks for your help.

 

Werner_E
25-Diamond I
(To:ygupta)

As already said in my other answer using the quickplot results in a curve which is edgy in the range of the smaller zeta values.

You could provide a range for zeta instead of the vector cretaed by logspace:B0.PNG

The problem is that we have much too much values where zeta is higher and maybe too few values (steps too large) where zeta is smaller.

Change the 0.2 to 0.5 to see that this is  a too large step in the smaller zeta range and makes an edgy curve

Change the 0.2 to 0.15 to see how long its takes to draw the curves

Change the 0.2 to 0.11 to see a strange effect

Furthermore this method would not be useful if the lower limit is not 10^-1 but 10^-6.

 

As we have the abscissa logarithmic scaled we would like to have the exponents evenly spaced, not the values itself. This is exactly what logspace does we can simulate it with a range variable:

B.PNG

 

Werner_E
25-Diamond I
(To:ygupta)

The plots look the same for me.

The plot you try to duplicate starts at 10^-1 but yours starts at 10^-6. Thats the reason the plots look different

B.png

You can do the plot without the logspace vector using Primes quickplot feature (use an undefined variable on the abscissa and set the desired range at the axis itself). But if you do so, Prime seems to chose automatically equidistant values for zeta and so you don't get a smooth curve for the smaller values of zeta. You would not need vectorization if you use quickplot, but I was to lazy to change that in the plot;-)

B2.png

If you need zeta to be a single scalar you may redefine it after the plot or, even better, use a different variable for plotting. Keep in mind that when you use a function the argument must NOT be the same name than the one you used when you defined the function (formal argument vs. actual argument).

 

ygupta
12-Amethyst
(To:Werner_E)

Thanks @Werner_E

 

I did not notice that the difference is due to the zeta definition in logspace funtion. Thanks for the explaination.

 

Cheers !

Werner_E
25-Diamond I
(To:ygupta)

Here is what you are probably looking for.

 

Sheet in format Prime 5 attached

B.png

BTW, to embed pictures in the text you have to use the "Photos" button at the top toolbar. If you just copy and paste a picture (which we all think is a feature which should be available, alas it isn't) it looks OK for you in first place but only until you press the "Post" button. Thats sure an undesired and irritating behaviour.

Hi,

 

In your sheet the definition of function f is wrong in the second term

 

Capture.JPG\

This is why it will not solve 

Cheers Terry

Please find converted worksheet for Mathcad Prime 3.1 version in attachment.

Announcements

Top Tags