for | Error: Expression or statement is incomplete or incorrect.
이전 댓글 표시
Rm=[0:10]
Xm=[5 7 9]
Zm=[10 5 7]
for
i=1:3
Rm=[0:10]
n(i)=abs(Xm-Rm)
Rs(Rm)=sqrt((n.^2)+(Zm.^2))
end
채택된 답변
추가 답변 (1개)
KSSV
2017년 5월 15일
Xm=[5 7 9] ;
Zm=[10 5 7] ;
Rm=linspace(1,10,length(Xm)) ;
Rs = zeros(size(Xm)) ;
for i=1:3
n=abs(Xm(i)-Rm(i)) ;
Rs(i)=sqrt((n.^2)+(Zm(i).^2)) ;
end
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!