how can i plot a graph for y vs x?

10 Ansichten (letzte 30 Tage)
reem123
reem123 am 9 Apr. 2017
Kommentiert: Star Strider am 12 Jun. 2017
how can i plot a graph for y vs x, for this function a=-(0.1014758667.*sin (x))./(1+0.03063737048.*y.*cos(x)+0.002809.*y.^2) where a=0.5 and x=0:20:360, y=0:0.1:1?

Akzeptierte Antwort

Star Strider
Star Strider am 9 Apr. 2017
Not possible.
The ‘a’ function has a maximum value of 0.1.
The Code
x=0:20:360;
y=0:0.1:1;
[X,Y] = meshgrid(x,y);
a = @(x,y) (-0.1014758667.*sin(x))./(1+0.03063737048.*y.*cos(x)+0.002809.*y.^2);
A = a(X,Y);
[R,C] = find(A == 0.5)
figure(1)
meshc(X, Y, A)
  54 Kommentare
reem123
reem123 am 12 Jun. 2017
oooh thank you Ihave to make plot
Star Strider
Star Strider am 12 Jun. 2017
Change your figure call to a figure and plot call:
figure
plot(x,br)
That worked when I ran it with the rest of your code, and produced an acceptable plot.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Errorbars finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by