How to restore output of for loop in matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
muhammad ismat
am 29 Sep. 2018
Beantwortet: muhammad ismat
am 29 Sep. 2018
If i have the code
For i=1:10
tmp1=zeros(i,k);
for k=1:2
tmp1(k)=sum((sam(i,:)-cen(k,:)).^2);
end
tmp1
end
i want to store the variable tmp1 in matrix 10× 2
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!