% this file must be in the same folder as the data being analyzed, so move % it around, but always put it back in the general New Load Cell folder clc; close all % CHANGE FILE NAME trial_1 = readtable("STNR Static Fire 11-11-2022.csv"); m = 61743.307; b = -5.5238; data_table = trial_1(:,2); data = table2array(data_table); time_actual = 0:.025:.025*(length(data)-1); data_calibrated = (m.*data)+b; % you may want to subtract off what the residual is based on graph maximum_thrust = max(data_calibrated) % CHANGE WHAT TIME ACTUAL EQUALS BASED ON WHERE THRUST STARTS AND ENDS start_fire = find(time_actual == 67.075); % time right before thrust starts increasing end_fire = find(time_actual == 70.125); % time when it ends average_thrust = mean(data_calibrated(start_fire:end_fire)) % CHANGE BURN TIME burn_time = 70.125 - 67.075 plot(time_actual, data_calibrated, 'b') title("") % ADD TITLE ylabel("Thrust [N]") xlabel("Time [s]") legend("Max Thrust at " + maximum_thrust + " N", "Location", "northeast") % CHANGE LIMITS BASED ON WHERE PEAK IS IN DATA xlim([66 71]) ylim([0 3000]) xticks([66 66.5 67 67.5 68 68.5 69 69.5 70 70.5 71])