plotting function over interval
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (1)
Star Strider
el 4 de Mzo. de 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 —

Categorías
Más información sobre Axes Appearance en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
