How to replace every value with the index of the value to the left of it
4 views (last 30 days)
Show older comments
This way the left most column is 0. I initially tried using a while loop but with a really big matrix, it takes way too long. so if I had a matrix
x= [ 2 3 4 5 6 ;
8 9 10 11 12 ]
the matrix i would want is
[ 0 1 3 5 7 9;
0 2 4 6 8 10 ]
I'm kind of at a crossroads here.
0 Comments
Answers (1)
See Also
Categories
Find more on Matrix Indexing 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!