I am new to Matlab and I am looking for help regarding this questions as attached
조회 수: 2 (최근 30일)
이전 댓글 표시

Creating a matrix using a "for-loop" and "create" commands.
댓글 수: 0
답변 (3개)
Image Analyst
2017년 8월 29일
For the "for loop" portion of the task:
counter = 1
for row = 1 : 5
for col = 1 : 8
A(row, col) = .....
counter......
end
end
You can finish it by replacing the ... with the appropriate code.
For the "create" command -- I have no idea what that is. I've never heard of the create() command.
댓글 수: 0
Ahmed Grera
2017년 9월 5일
편집: Ahmed Grera
2017년 9월 5일
clc
clear all
a=zeros(8,5); % zeros matrix
for i=1:1:40
a(i)=i;
end
b=a' % transpose of matrix (a)
댓글 수: 0
참고 항목
카테고리
Help Center 및 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!