Trying to use a solve block to solve for multiple inputs simultaneously
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
Solved! Go to Solution.
- Labels:
-
Math Homework
-
Mechanical_Engineering
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You are welcome. I'm glad I could help.