Matrix dimensions must agree error
Show older comments
t = sample.VarName1;
X = sample.VarName2;
indexOfComments = find(~isnan(sample.VarName3));
timeofcomment = sample.VarName1(indexOfComments);
t_end = t(indexOfComments);
indexTrim = t >= t_end - 5 & t <= t_end + 5 ;
t = t(indexTrim);
X = X(indexTrim);
Fs = 1/(t(2)-t(1));
I am getting an error 'Matrix dimensions must agree.'
Error in Untitled2 (line 106)
indexTrim = t >= t_end - 5 & t <= t_end + 5 ;
Please help!!
2 Comments
Dennis
on 7 Aug 2018
t and t_end might both be vectors of different sizes. Then you can't check if t>=t_end.
Akshat Shrivastava
on 7 Aug 2018
Accepted Answer
More Answers (0)
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!