Array manipulation with loop
Ältere Kommentare anzeigen
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!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!