Effacer les filtres
Effacer les filtres

for loop another way to implement it

1 vue (au cours des 30 derniers jours)
Sara
Sara le 27 Juin 2012
Is there any way to replace using for loop here by another way to do the desired?
x = zeros(length(v0),2) ;
for k = 1:length(v0)
A = [ factor1(:,k) factor2(:,k)];
b = -rhs(:,k);
x(k,:) = A\b ;
end
  1 commentaire
Walter Roberson
Walter Roberson le 27 Juin 2012
This seems to be the same code as in your previous Question, in which we are waiting for replies from you. http://www.mathworks.com/matlabcentral/answers/41655-index-exceeds-matrix-dimensions

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by