Tag Info

New answers tagged

5

First step: convert the code without modifications. This is the safest (we don't want to accidentally break the algorithm): {n, d} = Dimensions[var1]; k = ... Do[ var1[[i + 1, d - j]] = var1[[i + 2, j + 2]], {i, 0, k}, {j, 0, k} ] Next step: It looks weird to me that the iteration starts from 0, as both Mathematica and MATLAB index from 1. ...



Top 50 recent answers are included