how can i plot a graph for y vs x?

3 visualizzazioni (ultimi 30 giorni)
reem123
reem123 il 9 Apr 2017
Commentato: Star Strider il 12 Giu 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?

Risposta accettata

Star Strider
Star Strider il 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 Commenti
reem123
reem123 il 12 Giu 2017
oooh thank you Ihave to make plot
Star Strider
Star Strider il 12 Giu 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.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by