filling the cells of a column of strings
    2 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
Dear all,
I have a column of string variables
'01-01-2001'
'23-11-2008'
'21-12-2008'
'18-01-2009'
and I want to fill the 1rst, 40th, 79th and so forth position of this column as follows
for j=1:hhhh*qqqq*uuu
    mdata1{39*j-38,11}='01-01-2001'; 
end
but it is too slow. Any quicker code?
thanks
0 comentarios
Respuesta aceptada
  Oleg Komarov
      
      
 el 27 de Mayo de 2012
        You don't need a for loop:
mdata1(1:39:hhhh*qqqq*uuu,11) = {'01-01-2001'};
Más respuestas (0)
Ver también
Categorías
				Más información sobre Entering Commands 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!