Calculating max and minimum values between zero crossing points
Show older comments
I have a 23036 x 6 x 39 matrix which contains all of my data, from this i have calculated the zero crossing points for this data but i'm stuck on how i can use this information to calculate the maximum and minimum values between these points. I have attached the Zero crossing matrix and the code used however i couldn't attached the original as the file size is exceeded.
number=0;
for i=2561:size(Wavedata,1)-5118
for j=1:size(Wavedata,2)
for k=1:size(Wavedata,3)
if (Wavedata(i,j,k)<0 && Wavedata(i+1,j,k)>0)
number=number+1;% save index of zero-crossing
A(number)=i;
B(number)=j;
C(number)=k;
end
end
end
end
%A' is the timestep, dividing by the sampling frequency 128Hz gives the
%time value.
z=[(A'/128) B' C'];
Answers (0)
Categories
Find more on Signal Operations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!