Using find function in 3D array and coverting indices bact to 3D array.
    3 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Mantas Vaitonis
 el 21 de Jun. de 2018
  
    
    
    
    
    Respondida: KSSV
      
      
 el 21 de Jun. de 2018
            Hello,
I have 3D array with gpuArray elements size of x(1x5x500). Did use find function to find the indeces of this condition indx=find(x>t), in order to find indeces of the find elements did use [r,c,m]=ind2sub(size(x),indx). Now I need to store all indeces back to 3d array in order for further calculations, what would be a good way to do this?
0 comentarios
Respuesta aceptada
  KSSV
      
      
 el 21 de Jun. de 2018
        Using find will be slow. Go for logical indexing. These indices gives 1 where condition is obeyed and 0 if condition is not obeyed.
A = rand(1,5,10) ;
idx = A>0.5
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Creating and Concatenating Matrices 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!

