MATLAB: How to calculate the time interval and the mean of values in a row

row

Attached is a table of TC values from 13:50 to 14:30 where TCs represent the temperatures measured by seven thermocouples. I want to find a ramp rate where the average temperature of TC1, TC2, TC3. TC4, TC6, and TC7 at t is approximately 155. Ramp rate = dT/dt or (155-T0)/(t – t0). Units: T is in Fahrenheit and t is in minutes.
Thank you!

Best Answer

Put your data in a timetable, TT, then do the following:
%%Interpolate data every minute
TT2 = retime(TT,'minutely','linear');
%%Calculate row average
TT2.temp_avg=mean(TT2.Variables,2);
%%Find index of first occurence below 155 F
ind = find(TT2.temp_avg<155,1);
%%The corresponding time
TT2.Time(ind)
If you want even higher 'precision', then interpolate to a higher resolution.
code not tested
Related Question