why is my plot shows nothing?
古いコメントを表示
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');
採用された回答
その他の回答 (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
2018 年 3 月 18 日
2 投票
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?
カテゴリ
ヘルプ センター および File Exchange で Common Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!