How to plot different graph in one figure?
이전 댓글 표시
% Mullar Matrix analysis
clc
clear all
% [x,y]=meshgrid(-1:0.1:1,-1:0.1:1)
% y=1
% x=2
for x=-1:0.1:1
Y=c*Ey.*sind(t);
% M=[Z(1,1), Z(2,1), Z(3,1), Z(4,1)];
% G=stokes(fv)
% stokes(M)
figure(1)
plot(X,Y,'-',LineWidth=2),xlabel('2Ex'),ylabel('2Ey'),title('Polarization Ellipse') %,LineWidth=2)
hold on
end
end
This is my Code for polarization state of light, where I am doing a simulation of polarization rotation using Mueller matrix method.
- My input is in terms of position coordinates which varies from x=-1:1 and y=-1:1
- I can vary x and keep y constant, and can do same for y keeping x constant, This way I got polarization state from Hz. and Vr. scan.
- My device has dimention 2*2cm^2 where if I place this device on coordinate system -1 distance from left +1 for right and bottom and top respectively.
- I can plot any graph for a particular position by giving input.
- when I try for loop all the states are plotted at same position, I need to plot them at different spatial position (exactly at same input which I enter).
- I want what coordinate I give input, my polarization state to be plotted at that input. Different position have different stokes parameters , So different position (my input) of device have different state of polarization which I want to plot.
- Kindly help, how can I plot all the stokes parameter of my input in one figure. Code is attached above.
댓글 수: 5
Torsten
2023년 1월 2일
Which variable in your code do you want to plot agianst which variable(s) ? Use the variable names instead of polarization, position, stokes parameters or something similar.
DEEPAK KARARWAL
2023년 1월 2일
DEEPAK KARARWAL
2023년 1월 2일
답변 (1개)
Sulaymon Eshkabilov
2023년 1월 2일
You can try to use polar plot with polar(), e.g.:
...
figure(1)
polar(X,Y)
xlabel('2Ex'),ylabel('2Ey'),title('Polarization Ellipse')
hold all
...
카테고리
도움말 센터 및 File Exchange에서 Polar Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


