clear load x.out load z.out load ray1.pro for i=1:ray1(1)-2, zz(i)=(i-1)*ray1(2); end figure(1) subplot(211) plot(1.e6*(ray1(3:ray1(1))-1),zz); title('Modified Refractive Index Profile') xlabel('M(h) - M units') ylabel('Height (m)') grid on subplot(212) line(x/1000,z/1000) title('Ray paths') xlabel('Distance (km)') ylabel('Height (km)') grid on