Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.21 KB | None | 0 0
  1. degrees_arr = [0.087266463 0.174532925 0.261799388 0.34906585 0.436332313 0.523598776 0.610865238 0.698131701 0.785398163 0.872664626 0.959931089];
  2. visibility_arr = [0.936170213 0.914893617 0.870967742 0.784946237 0.677419355 0.548387097 0.397849462 0.268817204 0.086956522 0.078651685 0.288888889];
  3. colors_arr = [[1,0,0] [0,1,0] [0 ,0, 1] [0, 1, 1] [1, 0 ,1] [1, 1, 0] [0, 0 ,0] [0.8500 ,0.3250 ,0.0980] [0.4940 ,0.1840, 0.5560] [0.4660, 0.6740 ,0.1880] [0.6350, 0.0780, 0.1840]];
  4. length_arr = length(visibility_arr);
  5.  
  6. theta = linspace(0, 2*pi);
  7.  
  8. for i = 1:length_arr
  9.    
  10.     if i == length_arr
  11.         alpha = pi / 2 - acos(visibility_arr(i)) / 2;
  12.     else
  13.         alpha = acos(visibility_arr(i)) / 2 ;
  14.     end    
  15.    
  16.     x =  cos(alpha) * cos(theta);
  17.     y =  sin(alpha) * sin(theta);
  18.    
  19.     plot(x,y, 'Color' ,colors_arr(3 * i - 2 : 3 * i), 'LineWidth',3);
  20.     title('Ellipses of the angles from the calculated Visibility of Quarter-wave plate');
  21.     xlabel('X = cos(angle) \cdot cos(t)')
  22.     ylabel('Y = sin(angle) \cdot sin(t)')
  23.    
  24.    
  25.     hold on;
  26.     axis equal;
  27. end    
  28. legend('10^\circ','12^\circ','15^\circ','19^\circ','24^\circ','28^\circ','33^\circ','37^\circ','42^\circ','43^\circ','53^\circ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement