How can I mesh plot the array of a shape 1x51x51 (double)

3 ビュー (過去 30 日間)
Vahram Voskerchyan
Vahram Voskerchyan 2022 年 2 月 2 日
I am trying to analyse the mode profile inside the waveguide. And the software gives me the following plot.
The plot shows the mode profile in a bended waveguide.
When I try to export this data to matlab I get the data shaped 1x51x51 (E_intensity ). How can I manipulate this to get the same plot as shown in the image. Attached is the data.

採用された回答

Simon Chan
Simon Chan 2022 年 2 月 2 日
Try the folloiwng, noticed that the axis X and Y may be inverted and you need to verify and confirm the correct direcitons.
load('E_field.mat');
newE2 = squeeze(E_intenisty);
figure
[Ny,Nx]=size(newE2);
[X,Y]=meshgrid(1:Nx,1:Ny);
ax = gca;
pcolor(ax,Y,X,newE2)
hold on
shading interp
colorbar
colormap(ax,jet);
  1 件のコメント
Vahram Voskerchyan
Vahram Voskerchyan 2022 年 2 月 2 日
Thanks a lot this is exactly what I want!

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

その他の回答 (1 件)

Vahram Voskerchyan
Vahram Voskerchyan 2022 年 2 月 2 日
E_new = squeez(E2);
surf(E2);

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by