how can I find elements in matrix A between elements in matrix B
Mostrar comentarios más antiguos
Hi
with ref to the attached data and plot.
I'm trying to find the find the signal valley points between peaks with the intent of selecting the minimum valleypoint between two consecutive peaks.
so i would have peak,valley,peak
the two matrices are not equal length

i've tried to use find without success and would really appreciate some pointers
A = valley(:,1);
B = peak(:,1);
x = zeros(length(B)-1,1);
for ii = 1:length(B)-1
x = find(A(A>B(ii)) & A(A<B(ii+1)));
end
2 comentarios
gonzalo Mier
el 10 de Jun. de 2019
Did the code actually works? I think the find command crash because of the dimensions of A(A>B(ii)) and A(A<B(ii+1)) are not the same. Maybe you were trying to do:
x = find((A>B(ii)) & (A<B(ii+1)));
john kozicz
el 10 de Jun. de 2019
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Descriptive Statistics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!