Resolution of plot code errors
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
syms x;
y=1/sqrt((1-x^2)^2+(2*x)^2);
plot(x,y);
xlim([0 5]); ylim([0 4]);
I can't draw a graph. A code error appears
I need your help
0 Kommentare
Akzeptierte Antwort
Les Beckham
am 1 Dez. 2023
Why are you trying to do this with symbolic variables? It works using simple numeric variables.
x = linspace(-5, 5, 500);
y = 1 ./ sqrt((1-x.^2).^2 + (2*x).^2); % <<< use element-wise powers and division
plot(x, y);
% xlim([0 5])
ylim([0 4])
grid on
2 Kommentare
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!