% plot the data from the Lightwave Temperature sweep % Lightwave temperature LWTemp = [0.2744 0.2753 .2767 .2780 .2794 .2808 .2822 .2767 .2890 .3000 .3201 .3503 .3805 .3503 .3201 .2904 .2602 .2299 .2006 .1704 .1402 .1704 .1704 .2006 .2299 .2606] + 37; FreqDiff = [460.0 461.8 466.5 470.5 474.3 477.3 481.3 465.8 500.5 531.8 589.3 674.5 760.3 674.0 588.8 504.0 418.5 333.8 251.8 166.8 82.2 166.5 165.5 250.0 331.0 414.8]; % fit the data p = polyfit(LWTemp, FreqDiff, 1); p1 = p(1)/1000; % plot the data close all plot(LWTemp, FreqDiff, 'o', LWTemp, p(1)*LWTemp + p(2), '-') xlabel('Lightwave (deg C)') ylabel('Frequency Difference (MHz)') legend('Data', 'Linear fit', 'Location', 'NorthWest') title('Innolight - Lightwave frequency difference versus LW temperature. Innolight = 39.62 C') text(37.15, 530, ['Slope = ', num2str(p1, '%5.3f'), 'GHz/K'],... 'HorizontalAlignment','center',... 'BackgroundColor',[.7 .9 .7]) grid on orient landscape print('-dpdf', 'LightWave_temp_sweep.pdf')