Skip to main content
1-Visitor
April 7, 2021
Question

Shift values in matrix

  • April 7, 2021
  • 3 replies
  • 4001 views

Hey, I liked to know how to shift the values at matrix by a certain value like this.

Výstřižek.PNG
I have script in MathCad and matrix with hundreds values, and I need it to work automaticly. Thanks for help.

3 replies

23-Emerald IV
April 7, 2021
1-Visitor
April 7, 2021

Thanks a lot, it works, you are very kind.

25-Diamond I
April 7, 2021

Here are my 2 cents

In contrary to Luc's "Mrot", my "Mshift" uses programming and therefore does not work in the limited Prime Express version. Also notice that Mrot and Mshift rotate/shift in different directions.

Doubling the data by stacking the matrix on top of itself is bold and may be considered inefficient, but this should not be a problem with matrices of just a few hundreds of rows 😉

Werner_E_1-1617795549729.png

 

You may also use the same function to shift both rows and columns:

Werner_E_1-1617796107403.png

 

P6 worksheet attached

5-Regular Member
April 8, 2021

It can be with built in functions:

MSheykman_0-1617894530035.png

 

5-Regular Member
April 8, 2021

Or just by mangling with indices as follows:

MSheykman_0-1617894793872.png