Array manipulation with loop
Show older comments
Hello, I have a question about array manipulation:
Having an array A=[1;2;3;4;5;6] What is a simple way to update the array A so that when it loops, array A becomes: A=[2;3;4;5;6;7] for N times!
The element 7 is calculated from the first 6 elements and the values in the column are to be shifted upwards and the new value is to be replaced with the last value of previous array, for N number of times;
All help is very much appreciated, Thank you in advance!
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices 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!