Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi,
I'm somewhat new to mathcad and trying to solve an equation with a solve block. (see attached)
Tried several things, but without succes, I don't know if ti actually can work? perhaps with a for-while loop?
The equation is quite straight forward with some forces and lengths, resulting in a summed moment, for which I would like to find a 0.
Can anybody help to achieve this or help me in the right direction?
Kind regards, Casper
Solved! Go to Solution.
In case you want the values in the matrices you defined with the sum-symbol in their name to really be summed up, you have to tell Prime that it should do so. In this case Mh returns a single value and so a single variable x would be all that is needed:
EDIT: A third interpretation of what you are trying to achieve comes to my mind. Maybe you want the definition for Mh to be vectorized?
This would yield
Your function Mh returns a vector of 16 elements.
If you want this vector to be all zeros, this would mean you have 16 single equations.
Because you only provide one single variable x for Prime to vary, Prime is not able to find a solution:
No surprise, as you normally would need at least 16 unknows to get a solution.
If you define your guess as a vector of 16 elements, Prime is able to find a solution.
Not sure if this is what you are looking for:
In case you want the values in the matrices you defined with the sum-symbol in their name to really be summed up, you have to tell Prime that it should do so. In this case Mh returns a single value and so a single variable x would be all that is needed:
EDIT: A third interpretation of what you are trying to achieve comes to my mind. Maybe you want the definition for Mh to be vectorized?
This would yield
Hi Werner,
Thanks, that was indeed what I was trying to solve, to find 16 answers in an array.
The vector operator on the formula did the trip for the solve block.
Without the vector operator it already gave a vectorized solution when I left x out, hence wasn't aware of this.
Thanks again