Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
hello, I am new to mathcad programming. I am trying to create a program which has te following input: a function and matrix made of a variable number of rows and a column (a vector). The solution of the function for every element of the vector is a vector. I am trying to make a program which will stack the results for every value of the function, with the argument take from the vector.
To better understand what I am trying I attached the file.
Thank you.
Solved! Go to Solution.
An alternative to Richards proposal. Although my example has used the predefined function 'vec', no additional programming is required.
I have also changed the origin to zero.
Mike
Sorry I bored tonight!!!!
Another example if you don't want to use the built in function vec - I have added an additional For Loop to your program.
Mike
A word of caution, try not to defines variables as you have with h.i, a lot of programs are written using i and j in For loops, as you have, and it becomes very confusing.
Mike
Thank you for your help. I know it is confusing to use h.i, but my working domain is that of civil engineering, and some notation use the indice i, sometimes it can't be avoided.
I know it is confusing to use h.i, but my working domain is that of civil engineering, and some notation use the indice i, sometimes it can't be avoided.
There are many ways to get around it.
You used subscript i in your definition of h and then used i in the For Loop. Maybe change the For Loop variable name to something else.
Mike