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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

2-Guest

## Trying to use a solve block to solve for multiple inputs simultaneously

Hi, I am a student that is new to Mathcad and am having a lot of trouble getting a solve block to calculate the value of 2 separate variables with an indexed input. If anyone has any knowledge on how to get mathcad to do this, it would be very appreciated. Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby V
(To:ES_10230081)

I would rather turn all calculations into functions of theta.2 and use the function to plot

I attach the worksheet. At the and I also show how you could create vectors of values in case you would prefer that.
You will note that in the second solve block I had to get rid of the unit "in" temporary using the function "UnitsOf" and had to add it later. The reason is that Mathcad won't allow to define a function which returns a vector with mixed dimensions (angle and length).

6 REPLIES 6
24-Ruby V
(To:ES_10230081)

The error message a solve block throws most often are rather meaningless or misleading.

Right click the red theta6 and chose "Trace Error" and then "First". This brings up a more meaningful error message.

The reason for your solve block failing is the range for theta.2.

You should use ranges only to

.) index vectors/matrices

.) create a for-loop in a program

.) use it for the abscissa values in a 2D plot

I am not sure what you had in mind to do with that range. If the goal was to make the results of the solve block dependent on theta.2, you can turn the solve block into a function of theta.2

which you could use that way

You may also define separate functions for the two result values

You may now define a range variable and use it for plotting (note that you also have to add the unit "deg" to the second value 1)

You may use this range also to display a crude table of values

but you can't use those value for further calculations, can't assign the lists to a variable, etc.

If thats what you need you would have to create vectors, not ranges.

2-Guest
(To:Werner_E)

Very helpful information. My final goal is to plot the path of a point on a mechanism as a link (with angle theta 2) does a full rotation. So based off of what you said, I would need to create vectors, not ranges, as I need to use the value of theta 2 for further calculations. Would you be able to show me how to do this? If you need more information id be glad to give it

24-Ruby V
(To:ES_10230081)

I would rather turn all calculations into functions of theta.2 and use the function to plot

I attach the worksheet. At the and I also show how you could create vectors of values in case you would prefer that.
You will note that in the second solve block I had to get rid of the unit "in" temporary using the function "UnitsOf" and had to add it later. The reason is that Mathcad won't allow to define a function which returns a vector with mixed dimensions (angle and length).

2-Guest
(To:Werner_E)

You are a saint for taking the time to help me understand this. I am a senior in Mechanical Engineering and am just now beginning to learn the many great uses of mathcad. Once again, thank you for the thorough and detailed response!

2-Guest
(To:Werner_E)

This is also my first time posting on this forum, if there is anything I can do besides giving you a thumbs up let me know as I would gladly take the time to do it.

24-Ruby V
(To:ES_10230081)

You are welcome. I'm glad I could help.

Announcements
Top Tags