Hello
Maybe I have forgotten the little I learned about logical indexing, but I can't think of a way to translate this into something using find function or any sort of logical indexing.
Here is what I am trying to do in terms of a loop:
for t = 1:numel(T) if abs(T(t+4000) - T(t)) <= 0.1 tau = t; break; endend
I want to compare temperature values taken throughout a given amount of time. If the difference between temperatures that are 4000 indices (timepoints in this case) apart is less than 0.1, it gives me the timepoint. This is a basic heating/cooling problem and I just want to find tau.
I feel like there is a much more computationally efficient way to do this, but other options are escaping me at the moment. Thanks
Best Answer