Borrar filtros
Borrar filtros

submit a constant to matrices

1 visualización (últimos 30 días)
Abdulaziz
Abdulaziz el 2 de Oct. de 2013
Comentada: Matt J el 2 de Oct. de 2013
Hi guys I am wondering how can I define first element of number of matrices as a constant
I tried T{1:10}(1)=7; but I got the following message
??? Scalar cell array indices required in this assignment.
I appreciate your help

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 2 de Oct. de 2013
Editada: Azzi Abdelmalek el 2 de Oct. de 2013
for k=1:numel(T)
T{k}(1)=7
end
  2 comentarios
Abdulaziz
Abdulaziz el 2 de Oct. de 2013
Thanks Azzi this works but I just want to avoid using for loop as i can.
I appreciate
Matt J
Matt J el 2 de Oct. de 2013
You cannot avoid a for-loop. Nor is there a good reason to.

Iniciar sesión para comentar.

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