why is my plot shows nothing?
Show older comments
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');
Accepted Answer
More Answers (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
on 18 Mar 2018
2 votes
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?
Categories
Find more on Common Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!