How can I create multiple arrays from 2 separate arrays?
1 view (last 30 days)
Show older comments
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 Comments
Accepted Answer
Kevin Holly
on 17 Oct 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 Comments
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!