I am new to Matlab and I am looking for help regarding this questions as attached
1 次查看(过去 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!