why is my plot shows nothing?
Mostrar comentarios más antiguos
why is my plot shows nothing?
syms w
w=-1*10*pi:0.005:10*pi;
plot(w,sqrt(w.^2+w.^6)/(1+w.^4),'b');
Respuesta aceptada
Más respuestas (2)
Replace
plot(sqrt(w,w.^2+w.^6)/(1+w.^4),'b')
with
plot(sqrt(w.^2+w.^6)./(1+w.^4),'b')
Also,
syms w
line is irrelevant since in second line, you overwrite it with a numeric vector. Therefore delete it.
Rik
el 18 de Mzo. de 2018
2 votos
Because the command you are using has an incorrect syntax. You can't enter two input arguments to sqrt.
Also, you first declare w as a sym, but then overwrite it with a vector. You also didn't provide an x vector to plot (it is not strictly necessary, but it is good coding practice). And as a last remark, did you mean to use a matrix division inside that plot function?
Categorías
Más información sobre Common Operations 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!