How to create a 2D circular intensity plot?
古いコメントを表示

Hi, I can generate 2D plots like in the image above in comsol. I want to generate the same in matlab. This is a plot of electric field distribution in a cylindrical resonator. My matlab code has the electric field as a function of radius and angle. May be creating a meshgrid and then using polar command might be the way to go but I am not sure how to do that correctly. Any suggestion or link would be appreciated. Thanks </matlabcentral/answers/uploaded_files/22752/snapshot.png>
回答 (2 件)
Define your X Y Cartesian coordinates with meshgrid, convert to radius and angle
R = sqrt(X^2 + Y^2);
A = atan2(Y, X);
and run your function on R and A.
Zeba
2014 年 12 月 19 日
0 投票
4 件のコメント
Thorsten
2014 年 12 月 19 日
This is a new question. Please accept my answer and start a new question with a new title that better reflects your current problem.
Zeba
2014 年 12 月 19 日
Thorsten
2014 年 12 月 20 日
Please formally accept my answer if it was helpful.
MatlabUser
2022 年 2 月 18 日
can you please share the working code with intensity input thing?
カテゴリ
ヘルプ センター および File Exchange で 2-D and 3-D Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
