cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Shifting Matrix/Vector in Mathcad

Mathcad111
12-Amethyst

Shifting Matrix/Vector in Mathcad

Example: 

mathcad_ques_1+.JPG

ACCEPTED SOLUTION

Accepted Solutions

Hi,

Like this:-

Capture.JPG

Cheers

Terry

View solution in original post

11 REPLIES 11

Hi,

Like this:-

Capture.JPG

Cheers

Terry

Hi, this method is not working for -ve values and floating values in 'D', Pse suggest 

Eg: D=(0 1 -2 0)

Eg: D=(0 1.5 -2 0)

 

Hi,

Can you please provide an original "S" matrix and a Resulting matrix "Res" when you use a negative whole number in "D"?  I imagine this means a rotation of "S" values downwards in that column?  Can do this.

Can you please provide an original "S" matrix and a Resulting matrix "Res" when you use a floating value in "D"?  Not sure what this means?

 

Cheers

Terry

 

terryhendicott - 'I imagine this means a rotation of "S" values downwards in that column?' - Yes

 

terryhendicott -'when you use a floating value in "D"?  Not sure what this means?' - ok just for now, we will avoid/omit this requirement, let only focus on '-ve' values    

 

terryhendicott -'Can you please provide an original "S" matrix and a Resulting matrix "Res"', - currently I can't, i'll work on the same shortly.  

 

Pse check below attached, 

Tried this method but its not working, PFA.

Hi,

Hoping this is what you are seeking:-

Capture.JPG

Cheers

Terry

Thanks lot for response, i'll check the same.  

LucMeekes
23-Emerald III
(To:Mathcad111)

LucMeekes_1-1655725056379.png

Note that with a matrix of 4 rows, shifting 2 or -2 is the same.

Shifting a matrix over a non-integer amount of rows is not obvious. How would you define it?

 

Success!
Luc

 

LucMeekes
23-Emerald III
(To:Mathcad111)

OK, here's an implementation that takes an approach also for non-integer values of the 'number of elements to shift':

LucMeekes_0-1655759574329.png

Works also in Express.

(Prime 4 file attached)

Success!

Luc

Werner_E
25-Diamond I
(To:Mathcad111)

Her are my 2 cents

Werner_E_0-1655728150539.png

 

 

Announcements

Top Tags