- Read the documentation about vectorization .
- Look at some examples online.
- Try writing your own solution, perhaps on a simplified test case first.
- Don't expect other people to write your code for you.
- Write a question here when you have a specific problem to be fixed.
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How to vectorize given matlab code?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
i am new to matlab. can anyone please vectorize this code.
Thanks
for row=1:n
for col =1:n
Fn(row,col)= cost(row,col)*W(row,col);
if W(row,col)>0
Fn(row,col) = Fn(row,col)+FC(row,col);
end
end
end
1 Kommentar
Stephen23
am 5 Sep. 2014
Bearbeitet: Stephen23
am 5 Sep. 2014
Answer: yes, YOU can.
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!