I am new to Matlab and I am looking for help regarding this questions as attached
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Creating a matrix using a "for-loop" and "create" commands.
0 comentarios
Respuestas (3)
Image Analyst
el 29 de Ag. de 2017
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 comentarios
Ahmed Grera
el 5 de Sept. de 2017
Editada: Ahmed Grera
el 5 de Sept. de 2017
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 comentarios
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!