Calling multiple cell elements at once
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
Hello,
I have a cell something like
   A=
        [1x3 double]    [1x3 double]    [1x3 double]    [1x3 double]
Is it possible to call the first position of each vector at once? Something like
A{:}(1)
2 comentarios
  Matt J
      
      
 el 17 de Nov. de 2012
				Since your A{i} are all the same size and numeric type, it is puzzling why you would maintain it in cell form, as opposed to a 4x3 matrix for example.
Respuesta aceptada
Más respuestas (1)
  per isakson
      
      
 el 17 de Nov. de 2012
        Not with plain indexing. This one-liner does it
    r = cellfun( @(v) v(1), A )
However, ...
0 comentarios
Ver también
Categorías
				Más información sobre Data Types 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!



