Advertisement
Guest User

Untitled

a guest
Jul 25th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. ThetaPlot = [40,50]; % Put incident angle as input
  2.  
  3. Count1 = 0;
  4. Count2 = 0;
  5. NewColor = 0;
  6.  
  7. for m = 1:length(ThetaPlot)
  8. NewColor = 0.1;
  9. Title = sprintf('Angle(%d)',ThetaPlot(m));
  10. figure('name',Title)
  11. Count1 = 0;
  12. for i = 1:length(xrange)-1 % X Coordinate of Start Node
  13. for j = 1:length(yrange)-1 % Y Coordinate of Start Node
  14. Count1 = Count1+1;
  15. for k = 2:length(xrange) % X Coordinate of End Node
  16. for l = 2:length(yrange) % Y Coordinate of End Node
  17. Count2 = Count2+1;
  18. if ReflRayData(Count2,ThetaPlot(m) - ThetaIncident(1) + 1,Count1) == 1
  19. x = [xrange(i),xrange(k)];
  20. y = [yrange(j),yrange(l)];
  21. plot(x,y,['-',[0,NewColor,0],'o']);
  22. hold on;
  23. end
  24. end
  25. Count2 = 0;
  26. end
  27. end
  28. end
  29. NewColor = NewColor + 0.02;
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement