How to find rates of return to baseline after peaks, in temperature data over long timecourse?

82 views (last 30 days)
Hello all, new MatLab user here, find the tutorials and documentation very useful so far! I am trying to evaluate the performance of a freezer in my lab. I wish to know the rate at which it cools back down to its setpoint after a spike in temperature. I want to be able to determine these rates for events over two years
I've been able to import the data into matlab as a table with the datetime and temperature, and then use the "find local extrema" task to identify the peaks. But I am now stuck on how I can find the rates of change after these peaks in an automated fashion. I also converted the data into timetables and tried doing this in the Signal Analyzer app. Would anyone be able to point me in the right direction?
I've included a plot to provide an idea of the data I'm working with. This plot has ~250,000 data points
  4 Comments
Star Strider
Star Strider on 24 Nov 2025 at 19:01
The rate of cooling would likely be described as a decaying exponential (Newton's Law of Cooling), and that function would be:
nlc = @(b,t) b(1) .* exp(b(2) .*t) + b(3);
where b(1) is the original temperature excursion, b(2) is the rate you probably want to get, and b(3) is the offset. You would likely need to use the minutes or seconds function on the time variable (datetime turned into a duration) and then determine the sections of the data you want to use for each nonlinear regression. There are several funcitons that can handle that sort of regression in the Optimization Toolbox and the Statistics and Machine Learning Toolbox. The fminsearch function in core MATLAB could also work. It depends on what you have available.
Linaria
Linaria on 24 Nov 2025 at 19:17
Attached is a section of at least 10 events. There are events where temperature will spike again before reaching baseline. For approximate cutoffs of events of interest, I'd say any time the temperature is above -78C, to when it reaches -78C again.
I didn't mention in my original post, but I've also included the event log from the freezer, which tracks all door opening and closing events. Of course corresponding to the spikes in temperature.

Sign in to comment.

Answers (2)

dpb
dpb on 24 Nov 2025 at 20:24
Edited: dpb on 25 Nov 2025 at 6:09
whos -file EventSelection
Name Size Bytes Class Attributes EventSection - 993197 table EventSectionPlot 1x1 8 matlab.graphics.chart.primitive.Line
load EventSelection
head(EventSection)
DateTime RTD ____________________ _____ 20-Oct-2024 11:46:49 -79.8 20-Oct-2024 11:47:49 -79.8 20-Oct-2024 11:48:49 -79.8 20-Oct-2024 11:49:49 -79.8 20-Oct-2024 11:50:49 -79.8 20-Oct-2024 11:51:49 -79.8 20-Oct-2024 11:52:49 -79.8 20-Oct-2024 11:53:49 -79.8
d=dir('*.csv');
l=readlines(d.name);
l(1:20)
ans = 20×1 string array
"Date Time,Brief Desc,Detailed Desc" "06/03/2024 11:22:41 AM,Door Open Event,Door Opened." "06/03/2024 11:23:06 AM,Door Close Event,Door has been closed after 00:00:25" "06/03/2024 11:23:45 AM,Door Open Event,Door Opened." "06/03/2024 11:24:08 AM,Door Close Event,Door has been closed after 00:00:23" "06/03/2024 11:24:52 AM,Door Open Event,Door Opened." "06/03/2024 11:25:08 AM,Door Close Event,Door has been closed after 00:00:16" "06/03/2024 11:25:32 AM,Door Open Event,Door Opened." "06/03/2024 11:25:40 AM,Door Close Event,Door has been closed after 00:00:08" "06/03/2024 11:26:47 AM,Door Open Event,Door Opened." "06/03/2024 11:27:13 AM,Door Close Event,Door has been closed after 00:00:26" "06/03/2024 11:28:38 AM,Door Open Event,Door Opened." "06/03/2024 11:28:49 AM,Door Close Event,Door has been closed after 00:00:11" "06/03/2024 11:29:40 AM,Door Open Event,Door Opened." "06/03/2024 11:29:51 AM,Door Close Event,Door has been closed after 00:00:10" "06/03/2024 11:31:19 AM,Door Open Event,Door Opened." "06/03/2024 11:31:30 AM,Door Close Event,Door has been closed after 00:00:10" "06/03/2024 01:01:28 PM,Flash Settings,Setpoint: -80 Offset: 0 Lifeguard: 94 Time Delay: 0 Warm Alarm: -70 Cold Alarm: -90 Ext Ambient: 37 Bus Type: -1 Bus Setpoint: -65 Energy Model: 0 Cooling System: 0 Door Timeout: 1 New Bus UC: 1 Regulatory Type: 0" "06/03/2024 01:03:24 PM,Door Open Event,Door Opened." "06/03/2024 01:03:34 PM,Door Close Event,Door has been closed after 00:00:10"
EventSectionPlot
EventSectionPlot =
Line (RTD) with properties: Color: [0.1490 0.5490 0.8660] LineStyle: '-' LineWidth: 0.5000 Marker: 'none' MarkerSize: 6 MarkerFaceColor: 'none' XVariable: "DateTime" YVariable: "RTD" Use GET to show all properties
t=EventSectionPlot.XData; T=EventSectionPlot.YData;
plot(t,T)
Very astute observation by @Star Strider -- with the event log, I think I would also read it and select the pairs of door open and close events; those will be the start of a time from which to find the subsequent peak after the door was opened and then can look for the time at which the temperature again is a minimum before another rise.
The present table of data doesn't have the temperature trace; that would be the cleaner one to work from rather than the plot data...
Let's find one peak to play with and see what actually looks like...
[Tmax,imax]=maxk(T,1) % just largest location to look at
Tmax = -66.9000
imax = 49988
Npts=500; % this was empirical to see the whole peak width
plot(t(imax-Npts:imax+Npts),T(imax-Npts:imax+Npts))
hold on
N1=0; N2=300;
plot(t(imax-N1:imax+N2),T(imax-N1:imax+N2),'r-')
nlc=@(b,t) b(1).*exp(-b(2).*t)+b(3); % note -b(2) so rate constant will be positive value
tevent=minutes(t(imax:imax+N2)-t(imax)).'; % convert to elapsed time
y=T(imax:imax+N2).';
b0=[15,0.01,-80];
f=fitnlm(tevent,y,nlc,b0)
f =
Nonlinear regression model: y ~ b1*exp( - b2*t) + b3 Estimated Coefficients: Estimate SE tStat pValue ________ __________ _______ ___________ b1 16.405 0.1957 83.828 2.9807e-209 b2 0.020634 0.00047156 43.757 9.1504e-132 b3 -80.751 0.063906 -1263.6 0 Number of observations: 301, Error degrees of freedom: 298 Root Mean Squared Error: 0.692 R-Squared: 0.97, Adjusted R-Squared 0.969 F-statistic vs. constant model: 4.75e+03, p-value = 9.89e-227
ypred=predict(f,tevent);
plot(t(imax-N1:imax+N2),ypred,'b.')
The cycling before the event does appear as @Star Strider would suggest but the recovery after isn't so smooth as well as having the little double peak...but, the model doesn't do such a bad job of the trend although it does overpredict the peak. That may not be as signficant for the purpose of estimating the cooldown rate, however; that would probably depend upon just what is the intended or needed use.
The rate constant of b(2) = 0.0206 is in inverse minutes.
I think it would be very interesting to do a number of the cycling cycles and see how consistent this is across them and the other events. If had the event log data, could put it on the plot as well...
Note this is the largest peak in the lot there in November given the way maxk works to find N largest peaks and asked for one -- so actually is same as if had used max, anyways...
  5 Comments
dpb
dpb on 25 Nov 2025 at 19:05
I am not sure what the end objective really is, so concentrated on looking at one event in some detail over mass production.
A little more background might lead to some other ideas on processing.
For example, is the double peak in this particular incident significant on its own as a separate event? As noted, the model being a least squares fit minimizes the overall error and in this particular case, anyway, does overshoot the origin. Is the predicted -64.6 versus observed -66.9 at the peak unacceptable? If it is mandatory to go through the peak point, then one would have to switch to using a method such as fmincon that would allow for introducing constraints.
On the automatic location of endpoints for excursions, using the difference and looking for a change in sign is often very useful...if I get a chance I'll give that a go as well.
dpb
dpb on 26 Nov 2025 at 19:00
Edited: dpb on 27 Nov 2025 at 15:02
To explore alternate ways to find end of segment, beginning of next let's expand our view and split the overall and the change into two...
load EventSelection
t=EventSection.DateTime; T=EventSection.RTD; % some shorter names
[Tmax,imax]=maxk(T,1); % just largest location to look at
Npts=500; % this was empirical to see the whole peak width
N1=50; N2=300;
hAx=subplot(3,1,1);
plot(t(imax-N1:imax+Npts),T(imax-N1:imax+Npts))
hold on
plot(t(imax:imax+N2),T(imax:imax+N2),'r-')
% now look at the temperature gradient...
hAx(2)=subplot(3,1,2);
dT=round([nan;(diff(T(imax:end)))],1);
plot(t(imax:end),dT,'x-')
xlim(hAx(2),xlim(hAx(1))), ylim(0.5*[0 1])
[U,~,iU]=unique(dT(dT>0)); U
U = 10×1
0.1000 0.2000 0.3000 0.4000 0.6000 0.7000 0.8000 1.1000 1.4000 1.5000
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
hAx(3)=subplot(3,1,3);
dT=2*(dT>0)-1; % turn into bi-state
plot(t(imax:end),dT,'x-')
xlim(hAx(3),xlim(hAx(1)))
Now the change is very obvious; applying findpeaks here and walking back would lead to the point just before the next transient, even for the normal cycling if those are also of importance.
Alternatively, as the third plot shows, turning the difference into a bi-level flag then when
ixPlus=(diff(dT)==2);
since the change in state from -1 to +1 is now identically 2.

Sign in to comment.


Star Strider
Star Strider on 25 Nov 2025 at 2:53
Edited: Torsten on 26 Nov 2025 at 15:54
This calculates all the cooling rates that my findpeaks call can identify, then plots a few of them at the end.
I did not examine its results closely, however it appears to work. (It took a few hours and a fair amount of experimentation to get it to run as I want it to.) It identifies and estimates the parameters of 345 peaks, and produces a summary table of their times and rates at the end.
Try something like this --
LD = load('EventSelection.mat')
LD = struct with fields:
EventSection: [61995×2 table] EventSectionPlot: [1×1 Line]
Events1 = LD.EventSection
Events1 = 61995×2 table
DateTime RTD ____________________ _____ 20-Oct-2024 11:46:49 -79.8 20-Oct-2024 11:47:49 -79.8 20-Oct-2024 11:48:49 -79.8 20-Oct-2024 11:49:49 -79.8 20-Oct-2024 11:50:49 -79.8 20-Oct-2024 11:51:49 -79.8 20-Oct-2024 11:52:49 -79.8 20-Oct-2024 11:53:49 -79.8 20-Oct-2024 11:54:49 -79.8 20-Oct-2024 11:55:49 -79.8 20-Oct-2024 11:56:49 -79.8 20-Oct-2024 11:57:49 -79.8 20-Oct-2024 11:58:49 -79.8 20-Oct-2024 11:59:49 -79.8 20-Oct-2024 12:00:49 -79.8 20-Oct-2024 12:01:49 -79.8
Events2 = readtable('Meyer Lab -80_170564_EventLog_11_18_2025_01_08_45.csv', VariableNamingRule='preserve')
Events2 = 2046×4 table
Date Time Brief Desc Detailed Desc Var4 ______________________ ____________________ _______________________________________ __________ 06/03/2024 11:22:41 AM {'Door Open Event' } {'Door Opened.' } {0×0 char} 06/03/2024 11:23:06 AM {'Door Close Event'} {'Door has been closed after 00:00:25'} {0×0 char} 06/03/2024 11:23:45 AM {'Door Open Event' } {'Door Opened.' } {0×0 char} 06/03/2024 11:24:08 AM {'Door Close Event'} {'Door has been closed after 00:00:23'} {0×0 char} 06/03/2024 11:24:52 AM {'Door Open Event' } {'Door Opened.' } {0×0 char} 06/03/2024 11:25:08 AM {'Door Close Event'} {'Door has been closed after 00:00:16'} {0×0 char} 06/03/2024 11:25:32 AM {'Door Open Event' } {'Door Opened.' } {0×0 char} 06/03/2024 11:25:40 AM {'Door Close Event'} {'Door has been closed after 00:00:08'} {0×0 char} 06/03/2024 11:26:47 AM {'Door Open Event' } {'Door Opened.' } {0×0 char} 06/03/2024 11:27:13 AM {'Door Close Event'} {'Door has been closed after 00:00:26'} {0×0 char} 06/03/2024 11:28:38 AM {'Door Open Event' } {'Door Opened.' } {0×0 char} 06/03/2024 11:28:49 AM {'Door Close Event'} {'Door has been closed after 00:00:11'} {0×0 char} 06/03/2024 11:29:40 AM {'Door Open Event' } {'Door Opened.' } {0×0 char} 06/03/2024 11:29:51 AM {'Door Close Event'} {'Door has been closed after 00:00:10'} {0×0 char} 06/03/2024 11:31:19 AM {'Door Open Event' } {'Door Opened.' } {0×0 char} 06/03/2024 11:31:30 AM {'Door Close Event'} {'Door has been closed after 00:00:10'} {0×0 char}
[pks,plocs] = findpeaks(Events1.(2), MinPeakProminence=0.5);
for k = 1:numel(plocs)-1
[minv,idx] = min(Events1.(2)(plocs(k) : plocs(k+1)));
idxrng{k,:} = plocs(k):(plocs(k)+idx);
end
figure
plot(Events1.(1), Events1.(2))
hold on
plot(Events1.(1)(plocs), pks, '^r')
hold off
grid
Time = minutes(Events1.(1) - Events1.(1)(1));
nlc = @(b,t) b(1) .* exp(b(2) .*t) + b(3);
% locs = [locs; size(Events1,1)];
%
% QQQ = numel(idxrng)
B = NaN(3,numel(idxrng));
rn = NaN(size(B(1,:)));
for k = 1:numel(idxrng)
%k
% idxrng = locs(k) : locs(k+1);
% QQ = Events1(idxrng,:)
if isempty(idxrng{k}) | (min(Events1.(2)(idxrng{k})) == max(Events1.(2)(idxrng{k})))
continue
end
[tmin,tmax] = bounds(Time(idxrng{k}));
timek{k} = Time(idxrng{k})-tmin;
B0 = [max(Events1.(2)(idxrng{k})); -log(min(Events1.(2)(idxrng{k}))/max(Events1.(2)(idxrng{k}))) / (tmax-tmin); min(Events1.(2)(idxrng{k}))];
[B(:,k),rn(k)] = lsqcurvefit(nlc, B0, timek{k}, Events1.(2)(idxrng{k}),[],[],[],[],[],[],[],optimset('Display','none'));
% idxrngc{k} = idxrng;
tminmax(k,:) = [tmin tmax];
tminmaxidx(k,:) = [idxrng{k}(1) idxrng{k}(end)];
end
disp(B)
Columns 1 through 18 3.4763 35.9329 24.3310 78.6641 26.4218 16.5503 67.8262 2.4069 30.8427 40.0721 81.0157 74.5777 151.8064 2.1448 116.2314 28.9291 34.6017 45.4318 -0.0066 -0.0001 -0.0002 -0.0000 -0.0002 -0.0003 -0.0000 -0.0088 -0.0001 -0.0001 -0.0000 -0.0000 -0.0000 -0.0203 -0.0000 -0.0001 -0.0001 -0.0001 -81.9635 -115.8494 -104.1664 -158.5976 -106.3247 -96.3411 -147.6449 -80.6991 -110.9160 -120.0986 -161.0598 -154.5095 -231.0715 -80.4155 -196.4368 -109.0660 -114.7181 -125.5267 Columns 19 through 36 27.3475 3.8664 1.8573 72.1243 52.3253 4.3742 24.7202 2.2555 11.1398 55.6401 48.5590 57.3751 36.8357 37.0449 1.6012 1.2777 8.0377 9.4860 -0.0001 -0.0054 -0.0083 -0.0000 -0.0001 -0.0036 -0.0035 -0.1046 -0.0270 -0.0002 -0.0004 -0.0002 -0.0005 -0.0005 -0.0397 -0.0115 -0.0010 -0.0008 -107.3591 -81.4176 -80.4291 -152.1462 -132.3878 -83.2797 -94.8111 -72.5720 -79.5851 -135.4670 -128.5757 -137.6803 -117.1319 -117.4720 -80.7184 -80.0326 -87.6205 -89.0389 Columns 37 through 54 36.5174 38.9310 25.2520 219.4482 69.2458 153.1063 53.1289 62.5512 55.3846 32.9588 20.4103 4.4427 -10.0135 0.9356 1.9851 52.4540 70.7145 40.1679 -0.0002 -0.0001 -0.0002 -0.0001 -0.0001 -0.0000 -0.0001 -0.0001 -0.0001 -0.0001 -0.0002 -0.0051 -0.0001 -0.0456 -0.0033 -0.0001 -0.0000 -0.0001 -116.0956 -118.7082 -105.0310 -298.3228 -148.9874 -232.9409 -133.0529 -142.4711 -135.2474 -112.7417 -100.1341 -82.9845 -69.9219 -80.8249 -81.8636 -132.4697 -150.6825 -120.0104 Columns 55 through 72 108.6804 158.4069 16.3698 113.2169 87.1377 23.5657 59.4179 131.3954 18.5175 66.1013 42.5986 111.2251 55.8314 36.2015 45.8555 0.6736 33.2164 16.1517 -0.0000 -0.0000 -0.0007 -0.0000 -0.0000 -0.0002 -0.0001 -0.0000 -0.0002 -0.0002 -0.0000 -0.0000 -0.0001 -0.0001 -0.0000 -0.0036 -0.0001 -0.0002 -188.5724 -238.2437 -94.8692 -192.8029 -166.8986 -103.2423 -138.8125 -210.8387 -98.0466 -144.6740 -122.4611 -190.7509 -135.5506 -115.8212 -125.5098 -80.1652 -112.8096 -95.5062 Columns 73 through 90 50.6829 4.3737 64.7117 99.1173 54.4104 77.0163 78.9777 64.3000 211.9229 27.1505 151.0766 123.8955 79.6657 34.7732 5.9687 95.2925 153.4562 79.3881 -0.0003 -0.0022 -0.0001 -0.0000 -0.0001 -0.0000 -0.0000 -0.0002 -0.0000 -0.0002 -0.0000 -0.0000 -0.0000 -0.0001 -0.0030 -0.0000 -0.0000 -0.0000 -129.2573 -83.5045 -144.4633 -178.8196 -134.0782 -156.5301 -158.4645 -143.0785 -291.0903 -106.7247 -230.5037 -203.5945 -159.4436 -114.4607 -84.5474 -175.1489 -232.6229 -158.8384 Columns 91 through 108 45.9445 11.3366 23.2006 113.8229 42.3281 24.2960 41.8361 43.0108 56.3750 44.6681 82.6301 43.4819 57.8259 54.3222 52.0831 109.7043 9.6948 92.2817 -0.0001 -0.0003 -0.0001 -0.0001 -0.0001 -0.0001 -0.0001 -0.0000 -0.0000 -0.0001 -0.0001 -0.0001 -0.0000 -0.0001 -0.0000 -0.0000 -0.0004 -0.0000 -125.4758 -90.7981 -102.6840 -192.5282 -121.9574 -103.9294 -121.4623 -122.6602 -135.9276 -124.1003 -161.3231 -123.0095 -137.3834 -133.7802 -131.5366 -189.1060 -89.2104 -171.1224 Columns 109 through 126 2.1269 122.4702 69.7878 76.2289 22.9620 0.2528 3.2065 60.9288 63.3961 -1.9554 103.0118 106.4214 2.5153 30.7490 0.8540 0.5782 51.7498 137.9970 -0.0070 -0.0000 -0.0000 -0.0000 -0.0001 -0.0568 -0.0021 -0.0001 -0.0001 -0.0002 -0.0000 -0.0000 -0.0113 -0.0002 -0.0123 -0.0203 -0.0001 -0.0000 -79.7888 -201.7094 -149.1418 -155.6718 -102.4287 -78.8632 -81.6282 -140.5768 -143.1258 -77.7785 -182.8057 -186.1135 -79.7422 -110.0815 -80.0656 -80.2009 -131.1632 -217.4836 Columns 127 through 144 100.5162 1.1911 152.1695 104.4884 31.1992 17.0140 10.3708 33.7586 14.3226 71.8291 122.7200 62.0258 39.3939 109.1663 107.1497 103.1985 97.2061 93.3306 -0.0000 -0.0219 -0.0000 -0.0000 -0.0001 -0.0002 -0.0258 -0.0002 -0.0003 -0.0003 -0.0003 -0.0009 -0.0013 -0.0003 -0.0002 -0.0003 -0.0004 -0.0004 -179.3906 -79.0584 -231.3984 -183.8859 -110.6990 -96.5918 -79.3183 -112.9161 -93.2778 -151.2853 -201.7614 -141.2825 -118.8116 -188.7833 -186.8960 -182.9475 -176.9062 -173.0123 Columns 145 through 162 128.4812 106.0870 52.9925 97.0407 41.4952 53.0694 25.5934 14.5737 48.7473 85.9572 101.2627 39.1591 7.1533 26.7030 2.8514 1.0859 110.1067 67.6253 -0.0003 -0.0000 -0.0000 -0.0000 -0.0001 -0.0000 -0.0001 -0.0007 -0.0001 -0.0000 -0.0000 -0.0001 -0.0005 -0.0003 -0.0277 -0.0320 -0.0002 -0.0006 -207.4115 -185.7861 -132.8532 -176.5457 -121.1264 -132.7482 -105.0676 -93.2276 -128.4846 -165.7048 -180.9864 -119.1358 -87.0108 -103.4650 -75.6308 -80.3900 -190.0213 -147.4910 Columns 163 through 180 44.9057 83.2134 23.4231 94.9762 186.4191 1.6294 57.3087 39.9848 2.7756 40.0997 63.9939 30.1035 52.7218 82.4736 39.2512 2.3227 53.7314 23.2428 -0.0010 -0.0007 -0.0001 -0.0001 -0.0000 -0.0113 -0.0001 -0.0001 -0.0097 -0.0001 -0.0000 -0.0002 -0.0000 -0.0000 -0.0001 -0.0335 -0.0001 -0.0002 -124.8741 -162.5603 -103.6000 -174.4769 -265.5192 -80.5308 -137.4329 -120.1851 -81.4250 -120.6232 -144.2476 -109.9689 -132.9689 -162.3364 -119.3790 -80.5850 -133.8660 -103.1346 Columns 181 through 198 1.7906 61.7312 59.6634 87.2435 53.9058 132.3153 39.6567 59.2161 42.4425 85.4360 1.0253 33.1253 55.0407 6.2468 29.7625 43.5448 55.6675 19.0294 -0.0055 -0.0000 -0.0000 -0.0000 -0.0000 -0.0002 -0.0001 -0.0000 -0.0001 -0.0000 -0.0005 -0.0001 -0.0000 -0.0021 -0.0001 -0.0000 -0.0000 -0.0002 -81.2347 -141.3946 -139.2067 -166.9304 -133.4502 -210.9676 -119.3654 -139.0969 -122.1835 -165.2158 -80.6179 -112.8209 -134.5937 -84.8073 -109.3486 -123.1957 -135.2177 -98.3860 Columns 199 through 216 27.0096 44.8975 4.1011 30.1170 132.6890 0.6253 23.2968 1.6134 30.0933 19.3497 47.0558 89.3199 48.3706 3.2493 40.8573 48.9360 31.1755 171.3496 -0.0001 -0.0000 -0.0035 -0.0001 -0.0000 -0.0005 -0.0002 -0.0004 -0.0001 -0.0002 -0.0001 -0.0001 -0.0001 -0.0082 -0.0001 -0.0001 -0.0001 -0.0001 -106.5801 -124.6353 -82.6639 -110.0368 -212.4458 -80.2194 -102.9418 -81.4057 -109.9643 -99.0866 -126.7038 -168.0452 -128.1676 -79.5095 -119.6917 -128.1534 -110.6865 -250.0002 Columns 217 through 234 45.3055 56.2019 41.7771 56.8896 57.1380 25.0247 13.2279 3.3005 96.6552 4.5397 3.2748 41.4256 11.8526 24.2786 3.7806 3.5251 117.0175 59.2102 -0.0001 -0.0001 -0.0001 -0.0001 -0.0000 -0.0001 -0.0015 -0.0040 -0.0000 -0.0028 -0.0019 -0.0001 -0.0004 -0.0003 -0.0059 -0.0205 -0.0000 -0.0001 -124.9444 -135.4864 -121.5115 -136.8141 -137.1974 -104.9231 -91.7438 -82.6123 -176.9090 -83.8204 -83.5668 -121.9349 -92.3339 -103.3686 -82.1559 -82.2431 -197.3114 -139.5484 Columns 235 through 252 37.1388 50.5637 2.5226 4.2415 2.8694 2.7229 2.5320 2.6811 2.8583 2.5889 2.8663 2.8340 2.6579 2.7106 15.8306 3.9707 3.3769 3.2378 -0.0001 -0.0001 -0.0264 -0.0144 -0.0244 -0.0278 -0.0301 -0.0285 -0.0236 -0.0286 -0.0271 -0.0253 -0.0289 -0.0263 -0.0030 -0.0179 -0.0235 -0.0245 -117.4412 -130.4845 -80.9249 -83.0349 -81.5336 -81.4132 -81.3340 -81.3803 -81.5121 -81.2641 -81.5691 -81.5274 -81.3409 -81.3771 -94.2679 -82.6652 -82.1155 -81.9362 Columns 253 through 270 3.1647 2.9748 2.9727 2.8701 2.9249 2.7359 2.7189 2.6276 2.8437 2.8915 2.7766 2.6673 5.2481 2.8774 2.8428 2.7972 2.8300 2.7360 -0.0248 -0.0265 -0.0253 -0.0260 -0.0250 -0.0277 -0.0266 -0.0277 -0.0263 -0.0248 -0.0264 -0.0274 -0.0091 -0.0259 -0.0254 -0.0273 -0.0248 -0.0253 -81.8628 -81.6869 -81.6462 -81.5306 -81.5725 -81.4148 -81.3783 -81.2929 -81.5635 -81.5734 -81.4396 -81.3384 -83.6572 -81.5381 -81.5101 -81.4671 -81.4821 -81.3857 Columns 271 through 288 53.2533 6.7764 16.3825 2.0751 5.6498 5.8285 3.1401 3.3185 2.7900 2.7672 2.7715 2.8592 2.8246 2.2766 3.0617 3.1042 2.5870 2.5826 -0.0008 -0.0219 -0.0210 -0.0680 -0.0113 -0.0101 -0.0276 -0.0246 -0.0291 -0.0283 -0.0273 -0.0240 -0.0229 -0.0397 -0.0221 -0.0239 -0.0213 -0.0260 -132.2205 -74.2327 -80.6684 -80.8251 -84.4829 -84.6314 -81.7895 -81.8947 -81.5338 -81.4620 -81.4607 -81.5227 -81.5017 -80.8760 -81.7324 -81.7651 -81.3830 -81.3834 Columns 289 through 306 4.5140 6.1480 2.2906 2.4676 2.3353 2.3093 2.5152 2.1100 2.2913 2.3566 2.5675 2.5155 14.7043 2.0448 50.9065 3.2198 2.1426 17.2420 -0.0130 -0.0092 -0.0233 -0.0270 -0.0286 -0.0278 -0.0311 -0.0164 -0.0312 -0.0271 -0.0305 -0.0297 -0.0030 -0.0146 -0.0000 -0.0194 -0.0201 -0.0002 -82.9940 -85.0723 -81.0885 -81.2848 -81.1849 -81.1618 -81.3619 -81.0073 -81.1643 -81.2034 -81.4128 -81.3626 -93.2438 -80.9907 -131.4534 -82.1281 -80.9669 -97.7537 Columns 307 through 324 50.5621 45.8068 2.8022 54.8335 48.1698 95.2684 79.5568 42.4087 2.9219 77.0168 0.8605 99.6160 9.6213 49.1133 42.6604 0.6481 1.3372 2.7773 -0.0000 -0.0001 -0.0106 -0.0001 -0.0001 -0.0000 -0.0000 -0.0001 -0.0071 -0.0000 -0.0499 -0.0000 -0.0004 -0.0000 -0.0001 -0.0005 -0.0049 -0.0064 -131.1121 -126.2142 -81.2758 -135.2657 -128.6124 -175.7454 -159.9135 -122.9494 -81.4904 -157.3802 -81.0496 -179.9706 -90.1372 -129.6486 -123.0940 -81.0425 -81.7971 -81.3960 Columns 325 through 342 41.4979 46.7838 61.5699 54.6618 50.6051 29.0667 10.7907 -8.4084 0.9806 3.6054 1.9635 3.3210 4.0160 92.9619 10.0706 152.1494 16.9795 30.7922 -0.0001 -0.0000 -0.0000 -0.0000 -0.0000 -0.0004 -0.0342 -0.0002 -0.1034 -0.0060 -0.0516 -0.0234 -0.0171 -0.0006 -0.0166 -0.0003 -0.0036 -0.0005 -121.9011 -127.2410 -142.0243 -135.0239 -130.9355 -105.8818 -79.5734 -71.2270 -80.3577 -82.9465 -80.7733 -82.1028 -82.8289 -172.9524 -86.4095 -231.2938 -95.9545 -110.6206 Columns 343 through 345 4.2600 4.0348 3.5963 -0.0161 -0.0211 -0.0214 -83.1266 -82.8370 -82.2903
idxv = floor(linspace(1, size(B,2), 16))
idxv = 1×16
1 23 46 69 92 115 138 161 184 207 230 253 276 299 322 345
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
figure
tiledlayout(4,4)
for k = 1:numel(idxv)
nexttile
plot(Time(idxrng{k}), Events1.(2)(idxrng{k}))
hold on
plot(Time(idxrng{k}), nlc(B(:,k), timek{k}), '-r')
hold off
grid
title("Curve #"+idxv(k),"Rate = "+B(2,idxv(k)))
end
sgtitle("Selected Sample")
Cooling_Rates = B(2,:)
Cooling_Rates = 1×345
-0.0066 -0.0001 -0.0002 -0.0000 -0.0002 -0.0003 -0.0000 -0.0088 -0.0001 -0.0001 -0.0000 -0.0000 -0.0000 -0.0203 -0.0000 -0.0001 -0.0001 -0.0001 -0.0001 -0.0054 -0.0083 -0.0000 -0.0001 -0.0036 -0.0035 -0.1046 -0.0270 -0.0002 -0.0004 -0.0002
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
Cooling_Rates_Table = table(Events1.(1)(tminmaxidx(:,1)), Events1.(1)(tminmaxidx(:,2)), B(2,:).', VariableNames=["Start Time","End Time","Rate"])
Cooling_Rates_Table = 345×3 table
Start Time End Time Rate ____________________ ____________________ ___________ 20-Oct-2024 13:36:49 20-Oct-2024 15:50:49 -0.0066453 20-Oct-2024 16:48:49 20-Oct-2024 19:01:49 -0.00013244 20-Oct-2024 20:06:49 20-Oct-2024 22:01:49 -0.00021274 20-Oct-2024 22:57:49 21-Oct-2024 01:22:49 -4.8151e-05 21-Oct-2024 02:13:49 21-Oct-2024 04:08:49 -0.00016464 21-Oct-2024 05:23:49 21-Oct-2024 07:38:49 -0.00025439 21-Oct-2024 08:45:49 21-Oct-2024 11:14:49 -4.9398e-05 21-Oct-2024 14:06:49 21-Oct-2024 20:40:49 -0.0088093 21-Oct-2024 21:30:49 21-Oct-2024 23:57:49 -0.0001205 22-Oct-2024 00:57:49 22-Oct-2024 03:15:49 -0.00010615 22-Oct-2024 04:03:49 22-Oct-2024 06:32:49 -4.1313e-05 22-Oct-2024 07:17:49 22-Oct-2024 09:42:49 -4.9902e-05 22-Oct-2024 12:06:49 22-Oct-2024 14:04:49 -3.1714e-05 22-Oct-2024 14:33:49 22-Oct-2024 18:40:49 -0.02028 22-Oct-2024 19:31:49 22-Oct-2024 21:55:49 -1.6792e-05 22-Oct-2024 22:57:49 23-Oct-2024 00:43:49 -0.00014817
.
  2 Comments
Linaria
Linaria on 25 Nov 2025 at 17:50
Thank you so much for your efforts, this is truly excellent! It will take me a bit to parse through it all and tweak/mess around with things.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!