![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/881740/image.jpeg)
How can I mesh plot the array of a shape 1x51x51 (double)
조회 수: 1 (최근 30일)
이전 댓글 표시
I am trying to analyse the mode profile inside the waveguide. And the software gives me the following plot. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/881635/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/881635/image.jpeg)
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.
댓글 수: 0
채택된 답변
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);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/881740/image.jpeg)
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Orange에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!