How to make a new array based on two arrays?
Show older comments
A=[1 4 3 1 5 9 1 11 14 15 16];
B=[1 4 3 1 5 6 7 8 9 1 11 12 13 14 15 16];
How to make a new array like this:
C=[1 4 3 1 5 nan nan nan 9 1 11 nan nan 14 15 16];
The new array are to be like A but in addition has nan where the numbers are missing so it will end up with the same length as B.
Accepted Answer
More Answers (0)
Categories
Find more on Operators and Elementary Operations 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!