Skip to main content
1-Visitor
March 6, 2022
Solved

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

  • March 6, 2022
  • 1 reply
  • 2710 views

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

Best answer by Werner_E

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

Werner_E_1-1646614530328.png

 

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).

 

1 reply

25-Diamond I
March 6, 2022

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.

Werner_E_0-1646606925674.png

 

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

Werner_E_1-1646607510938.png

which you could use that way

Werner_E_2-1646607554785.png

You may also define separate functions for the two result values

Werner_E_3-1646607670853.png

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)

Werner_E_4-1646607755867.png

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

Werner_E_5-1646607811746.png

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.

 

 

1-Visitor
March 6, 2022

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

 

Werner_E25-Diamond IAnswer
25-Diamond I
March 7, 2022

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

Werner_E_1-1646614530328.png

 

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).