- 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
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How to vectorize given matlab code?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
Stephen23
2014년 9월 5일
편집: Stephen23
2014년 9월 5일
Answer: yes, YOU can.
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!