Effacer les filtres
Effacer les filtres

what is the meaning of this code

1 vue (au cours des 30 derniers jours)
praveen singathi
praveen singathi le 20 Mar 2021
for i=1:1:n
M(:,i)=ca{i}(:);
end

Réponse acceptée

Walter Roberson
Walter Roberson le 20 Mar 2021
ca is a cell array. The first n entries of the cell array are to be reshaped into vectors and stored as columns of M. You would get an error if the number of elements in each entry is not the same.
In some cases, the code could be replaced with a call to cell2mat(), depending on what the shape of the entries is.
  1 commentaire
praveen singathi
praveen singathi le 20 Mar 2021
tq for ur explanation

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by