Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear, clc;
- a = importdata("realDataEdit.csv");
- x = a.data(:,3);
- y = a.data(:,6);
- scatter(x,y);
- coeffs = polyfit(x, y, 1);
- fittedX = linspace(min(x), max(x), 200);
- fittedY = polyval(coeffs, fittedX);
- hold on;
- plot(fittedX, fittedY, 'r-', 'LineWidth', 3);
- xlabel('Altitude Above Sea Level (feet)');
- ylabel('TVOC Concentration (parts per billion)');
- title('TVOC Concentration vs Altitude');
- ylim([-1,35]);
- legend({'Measurement Point','Line of Best Fit'},'Location','northeast')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement