How can I create multiple arrays from 2 separate arrays?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Sang Duong
el 17 de Oct. de 2022
Comentada: Kevin Holly
el 17 de Oct. de 2022
I want to create arrays from A and B, from A(1):B(1), A(2):B(2), A3(B),....... I have never done this before and I don't know how to make it work?
0 comentarios
Respuesta aceptada
Kevin Holly
el 17 de Oct. de 2022
Is this what you were trying to do?
A = [1,3,5,7];
B = [2,4,6,8];
for i = 1:length(A)
array(i,:) = A(i):0.1:B(i);
end
array
2 comentarios
Más respuestas (0)
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!