フィルターのクリア

how can i plot contour

1 回表示 (過去 30 日間)
khaled Abdelghafar
khaled Abdelghafar 2022 年 3 月 1 日
コメント済み: Walter Roberson 2022 年 3 月 1 日
i encounter an error while trying to plot the following contour
x=0:0.1:4;
x1=-pi:0.001*pi:pi;
y1=(100*sqrt(2*pi)./sqrt(x.*2*pi)).*cos(x1/2).*(1.-sin(x1/2.).*sin(3.*x1/2.));
y2=(100*sqrt(2*pi)./sqrt(x.*2*pi)).*cos(x1/2).*(1.+sin(x1/2.).*sin(3.*x1/2.));
y3=(100*sqrt(2*pi)./sqrt(x.*2*pi)).*cos(x1/2).*sin(x1/2.).*sin(3.*x1/2.);
y4=(1/2).*((y1-y2)^2+y1^2+y2^2+6.*y3^2);
z=abs(sqrt(y4));
[x,x1]=meshgrid(x,x1);
% contour(x,x1,z)
contour(real(z))

採用された回答

Walter Roberson
Walter Roberson 2022 年 3 月 1 日
x = (0:0.1:4).';
x1=-pi:0.001*pi:pi;
y1=(100*sqrt(2*pi)./sqrt(x.*2*pi)).*cos(x1/2).*(1.-sin(x1/2.).*sin(3.*x1/2.));
y2=(100*sqrt(2*pi)./sqrt(x.*2*pi)).*cos(x1/2).*(1.+sin(x1/2.).*sin(3.*x1/2.));
y3=(100*sqrt(2*pi)./sqrt(x.*2*pi)).*cos(x1/2).*sin(x1/2.).*sin(3.*x1/2.);
y4 = (1/2).*((y1-y2).^2+y1.^2+y2.^2+6.*y3);
z = sqrt(y4);
[x,y]=meshgrid(x1,x);
% contour(x,x1,z)
contour(x, y, real(z))
  5 件のコメント
khaled Abdelghafar
khaled Abdelghafar 2022 年 3 月 1 日
i would changed to r and theta
the question how i plot the contour in x,y not r and thata
how could i do it
Walter Roberson
Walter Roberson 2022 年 3 月 1 日
You do not need to construct x2 and x3 for that contribution.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by