how could i plot a contour
1 回表示 (過去 30 日間)
古いコメントを表示
khaled Abdelghafar
2022 年 2 月 28 日
コメント済み: Abolfazl Chaman Motlagh
2022 年 2 月 28 日
Hi
i want to plot the following contour but i always encounter an error
x=-pi:0.001*pi:pi;
y=0:0.1*6:6;
[x,y]=meshgrid(x,y);
z=(100*sqrt(2*pi)/sqrt(2*pi.*(y-2.))).*cos(x/2).*(1.-sin(x/2.).*sin(3.*x/2.));
contour(x,y,z)
1 件のコメント
Abolfazl Chaman Motlagh
2022 年 2 月 28 日
採用された回答
Arif Hoq
2022 年 2 月 28 日
編集済み: Arif Hoq
2022 年 2 月 28 日
you shoud demontrate element wise multiplication/division in the variable z. most porbably this contour is allowed to plot real value.
x=-pi:0.001*pi:pi;
y=0:0.1*6:6;
[x,y]=meshgrid(x,y);
z=(100*sqrt(2*pi)./sqrt(2*pi.*(y-2))).*cos(x./2).*(1-sin(x./2).*sin(3*x./2));
% contour(x,y,z)
contour(real(z))
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
