HI everyone, i am new on matlab and i need some help to plot a transcendental equation. The equation is:
sin(beta - phi)+sin(phi)*exp(-beta/atan(phi)=0;
This curve represents the conduction angle beta given a phi angle. The plot needs to represents beta degrees (Y axis) vs phi degrees (X axis).
The point is that phi varies from 0 to 100º deg, and beta varies from 0 to 380º deg, i want to see the relation between phi and beta.
Cand someone give me some help?
Cheers!

 Réponse acceptée

John D'Errico
John D'Errico le 20 Août 2017
Modifié(e) : John D'Errico le 20 Août 2017
ezplot('sind(beta - phi)+sind(phi).*exp(-beta./atand(phi))',[0 380 0 100])
When you are not sure how to plot something, ezplot (or one of its cousins) is often a good thing to try.

6 commentaires

Jucimar Carpe
Jucimar Carpe le 20 Août 2017
Modifié(e) : per isakson le 21 Août 2017
Hi John thank you in advance,
I got a plot but it was not i was expecting, i need a graph the this attached. What can i do?
**
phi= 0:0.1:100;
beta= 0:0.1:380;
ezplot('sind(beta - phi)+sind(phi).*exp(-beta./atand(phi))',[0 380 0 100]);
Should I have known that despite your use of atan in the formula that you wrote, that what you really meant was tan? The crystal ball is so foggy, that reading your mind is terribly difficult.
There is NO need to define phi and beta in advance. Did I tell you to do that? No.
This is closer to what you show.
ezplot('sind(beta - phi)+sind(phi).*exp(-beta./tand(phi))',[180 360 0 100])
Note, the curve as I have plotted it is accurate. At beta == 260,
syms beta phi
vpasolve(subs(sin((beta - phi)*pi/180)+sin(phi*pi/180).*exp(-beta./tan(phi*pi/180)) == 0,beta,260),phi,70)
ans =
79.999999999999999999306195582066
phi is almost exactly 80.
So I don't know where you got that nice, smoothly curving plot.
Jucimar Carpe
Jucimar Carpe le 20 Août 2017
I am really sorry, i didn't noted that i told you it was tan(phi). My bad :(
This curve was plotted in a book that i have about power electronics.
Thanks a lot!
John D'Errico
John D'Errico le 20 Août 2017
Your formula used atan. Admittedly, it would make little sense if it was atan, since the argument was in degrees.
What intrigues me is that while the general shape of the curve is the same, the curve as is generated is much more sharply breaking, around 270 in beta. The curve you showed was a nice smoothly rising curve, and that is completely inconsistent with what I see.
Teja Muppirala
Teja Muppirala le 21 Août 2017
Modifié(e) : Teja Muppirala le 21 Août 2017
FPLOT (or FIMPLICIT in this case) is recommended over EZPLOT.
fimplicit(@(beta,phi) sind(beta - phi)+sind(phi).*exp(-beta./tand(phi)),[0 380 0 100])
FPLOT will replot the graph upon zooming (and also panning if you don't explicity send in limits) and display locations of singularities.
In the implicit case, FIMPLICIT actually gives you a true line that can be queried instead of a contour plot like EZPLOT.
Jucimar Carpe
Jucimar Carpe le 21 Août 2017
Hi guys, actually i noted that may have a little tricky on the graph that i sent. Usually we use deg instead of rad, i think the graph was plotted originally in radians and then changed the X and Y axis to degrees.
To make sure, i cheanged the program line to:
ezplot(@(beta,phi) sin(beta - phi)+sin(phi).*exp(-beta./tan(phi)),[pi (380*pi/180) 0 (100*pi/180)]) hold on grid on
And changed the scale of the graph and got the this result, as you can see it is close enough from the original.
Give a look at the results.
Thank you.

Connectez-vous pour commenter.

Plus de réponses (1)

amita tripathi
amita tripathi le 19 Déc 2018

0 votes

What, if we want to plot histogram of the trancendental expression like .

Catégories

En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by