plotting function over interval
Ältere Kommentare anzeigen
a=62; b=95;
v = linspace(-pi, pi, 1000); y = @(x) (3*x.^2.*sin(a*x))/(x.^2+b); plot(y,v)
how is it possible to plot this function?
Akzeptierte Antwort
Weitere Antworten (1)
Star Strider
am 4 Mär. 2017
You have to call the function in the plot statement in order to plot it.
The Code —
a=62; b=95;
v = linspace(-pi, pi, 1000);
y = @(x) (3*x.^2.*sin(a*x))./(x.^2+b);
figure(1)
subplot(1,2,1)
plot(y(v),v)
xlabel('y(v)')
ylabel('v')
subplot(1,2,2)
plot(v, y(v))
xlabel('v')
ylabel('y(v)')
The left subplot plots ‘v’ against ‘y(v)’, and the right subplot plots ‘y(v)’ against ‘v’.
The Plots —

Kategorien
Mehr zu Axes Appearance finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
