Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Using: MathCAD Prime 9.0
Hello,
I am trying to add a scalar value to every other column in a large matrix (each element in an even column). I included a screenshot below of a small scale example of the input matrix M, scalar value to add, and the desired output. I thought this might be able to be accomplished using a for loop of some kind looping through the elements and only adding the scalar to the even columns, but I wasn't able to figure out how to do this.
The real application is I have a large matrix of time and current values with every other column being the time columns, and want to add a scalar value to shift the time values.
Any help would be greatly appreciated!
Solved! Go to Solution.
I would suggest using a small user-written utility function (which also should be ORIGIN-aware for maximal portability):
Prime 9 sheet attached
I would suggest using a small user-written utility function (which also should be ORIGIN-aware for maximal portability):
Prime 9 sheet attached