2 variables in a loop
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
hello,
I'm very new to Matlab,
the loop below doesn't work because I have 2 variables within the loop, is there any way I can solve this? iv is said to be a 1x1 matrix when I need it to be a 1x955, thank you
for iv=1:955
ic=0.1:0.1:95.5;
c=ic*Vm_1000(iv,:);
end
댓글 수: 0
답변 (1개)
Thorsten
2014년 11월 27일
You do not need a for loop, use piece-wise multiplication .*
ic=0.1:0.1:95.5;
c=ic.*Vm_1000;
댓글 수: 0
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!