Why should we write x(i,1)=cos(theta(1,i) in this format while using the for loop?

조회 수: 1(최근 30일)
I have a doubt regarding this way of represention.
for i=1:n+1
Why cant we represent it as-

채택된 답변

KSSV 2021년 8월 17일
편집: KSSV 2021년 8월 17일
x = zeros(n+1,1) ;
for i=1:n+1
You can very much write like you shown. But keep in mind that the variables should be vectors.
  댓글 수: 4

댓글을 달려면 로그인하십시오.

추가 답변(0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by