In an assignment A(I) = B, the number of elements in B and I must be the same, error.
이전 댓글 표시
x =
4
5
6
7
8 %5x1
X =
1
2
3
4
5
6 %6x1
q=6;
for i=1:q
dk(i)=x-X(i)
end
%it gives me the error.
%in this statement, I wanna create this situation,
dk(1)=x-X(1)
dk(2)=x-X(2)
dk(3)=x-X(3)
dk(4)=x-X(4)
dk(5)=x-X(5)
dk(6)=x-X(6)
What kind of loop I need to create these "dk".
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!