graph not plotting anything
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Christabelle Miels
el 3 de Mayo de 2021
Respondida: KSSV
el 3 de Mayo de 2021
When i plot the following graph nothing appears.
theta = linspace(0,2*pi, 1000);
d2b = -(a*cos(theta)*c^2 - a^2*sin(theta).^2.^(3/2) + a^3*sin(theta).^4 + a*c^2*cos(theta).^2 - a*c^2*sin(theta).^2)/(c^2 - a^2*sin(theta).^2).^(3/2);
plot(theta,d2b, 'g');
xlim([0,2*pi])
figure(3)
plot(theta,d2b,'g')
set(gca,'XTick',0:pi/2:2*pi)
set(gca,'XTickLabel',{'0','pi/2','pi','3*pi/2','2*pi'})
0 comentarios
Respuesta aceptada
KSSV
el 3 de Mayo de 2021
You need to use element by element by division i.e. ./ in the formula.
theta = linspace(0,2*pi, 1000);
d2b = -(a*cos(theta)*c^2 - a^2*sin(theta).^2.^(3/2) + a^3*sin(theta).^4 + a*c^2*cos(theta).^2 - a*c^2*sin(theta).^2)./(c^2 - a^2*sin(theta).^2).^(3/2);
plot(theta,d2b, 'g');
xlim([0,2*pi])
figure(3)
plot(theta,d2b,'g')
set(gca,'XTick',0:pi/2:2*pi)
set(gca,'XTickLabel',{'0','pi/2','pi','3*pi/2','2*pi'})
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Graphics Performance en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!