Dear MathWorks comunity,
I want to plot a function containing two variables: r and phi.

sigma and a are constants, I want to display sigma x dependent of r and phi in an polar diagramm like the one shown below.

I really tried to find a soulution by myself (polarplot3d for example), but I couldnt find a way and my colleagues didnt knew either. It seems like an easy task for someone who knows what to do. I would be happy if someone could help me out.
best wishes
Paul from Germany

 採用された回答

Torsten
Torsten 2022 年 5 月 27 日
編集済み: Torsten 2022 年 5 月 27 日

0 投票

a = 1.0;
sigma = 2.0;
r = 0.2:0.001:3;
phi = 0:pi/100:2*pi;
[R,PHI] = meshgrid(r,phi);
X = R.*cos(PHI);
Y = R.*sin(PHI);
SIGMAx = sigma*sqrt(a./(2*R)).*cos(PHI/2).*(1-sin(PHI/2).*sin(3/2*PHI));
contourf(X,Y,SIGMAx)

2 件のコメント

Paul Schütz
Paul Schütz 2022 年 5 月 28 日
Thank you so much! That solved my problem :)
Torsten
Torsten 2022 年 5 月 28 日
編集済み: Torsten 2022 年 5 月 28 日
I think I forgot a "sigma":
SIGMAx = sigma*sqrt(a./(2*R)).*cos(PHI/2).*(1-sin(PHI/2).*sin(3/2*PHI)) - sigma;
instead of
SIGMAx = sigma*sqrt(a./(2*R)).*cos(PHI/2).*(1-sin(PHI/2).*sin(3/2*PHI));

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

その他の回答 (1 件)

Bjorn Gustavsson
Bjorn Gustavsson 2022 年 5 月 27 日

0 投票

A quick search on the file exchange leads to these submissions:pcolor-in-polar-coordinates, 3d-polar-plot and polar-contour-plot. Most likely one of those will be (very close to) what you want, from there you should be able to modify to suit your need.
HTH

1 件のコメント

Paul Schütz
Paul Schütz 2022 年 5 月 28 日
Thank you too :)

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

カテゴリ

ヘルプ センター および File ExchangePolar Plots についてさらに検索

製品

リリース

R2021a

質問済み:

2022 年 5 月 27 日

編集済み:

2022 年 5 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by