Skip to main content
8-Gravel
May 22, 2022
Solved

Join vectors using for loop in Mathcad

  • May 22, 2022
  • 1 reply
  • 3094 views

Hello everyone,

I am quite new at programming in Mathcad.

I am trying to create a matrix using different vectors that are obtained based on a certain condition:

MC_9370533_1-1653234820801.png

 

I made an example with vectors N and M. The idea is to reach at the end the matrix "Final".

 

Is there a way to use a for loop function to define the final matrix taking into account that the number of rows in the vectors N and M can change (but still equal)?

 

Thank you,

Best answer by StuartBruff

@MC_9370533 wrote:

Hello everyone,

I am quite new at programming in Mathcad.

I am trying to create a matrix using different vectors that are obtained based on a certain condition:

MC_9370533_1-1653234820801.png

 

I made an example with vectors N and M. The idea is to reach at the end the matrix "Final".

 

Is there a way to use a for loop function to define the final matrix taking into account that the number of rows in the vectors N and M can change (but still equal)?

 


Perhaps something like this?

 

2022 05 22 a.png

 

Stuart

1 reply

23-Emerald V
May 22, 2022

@MC_9370533 wrote:

Hello everyone,

I am quite new at programming in Mathcad.

I am trying to create a matrix using different vectors that are obtained based on a certain condition:

MC_9370533_1-1653234820801.png

 

I made an example with vectors N and M. The idea is to reach at the end the matrix "Final".

 

Is there a way to use a for loop function to define the final matrix taking into account that the number of rows in the vectors N and M can change (but still equal)?

 


Perhaps something like this?

 

2022 05 22 a.png

 

Stuart

May 23, 2022