Borrar filtros
Borrar filtros

save index of find- loop in a table

2 visualizaciones (últimos 30 días)
Frederik Reese
Frederik Reese el 24 de Mayo de 2022
Comentada: Frederik Reese el 24 de Mayo de 2022
Hi,
I have a table and im looking for values of each row with find.
In the next step I want to save the column number (index) of the searched objekt in a table for each row.
Thanks
for i=1:143
[row,col]=find(HQ10000_WH(i,[1:10498])>0,1,'first')
end

Respuesta aceptada

KSSV
KSSV el 24 de Mayo de 2022
Editada: KSSV el 24 de Mayo de 2022
C = cell(143,1) ;
for i=1:143
[row,col]=find(HQ10000_WH(i,[1:10498])>0,1,'first')
C{i} = col ;
end
  4 comentarios
Frederik Reese
Frederik Reese el 24 de Mayo de 2022
thanks
Frederik Reese
Frederik Reese el 24 de Mayo de 2022
how do i get the cell back to a double, with replacing the [] rows with 0 or NaN?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by