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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Calculating formula for multiple variables

sdwivedula
1-Visitor

Calculating formula for multiple variables

Hi,

I am new to MathCAD and am looking for help.  Say I have a formula with two variables (a=b+c).  I want to calculate the value of "a" for 100 values of b.  So, I need 100 answers, one for each value of 'b." I am hoping to get an answer in the form a 100 rows x1 column table for values of "a." I greatly appreciate your help! Thank you.  

3 REPLIES 3

This is the area for help with the PTC Community itself.  There are several area for MathCAD, see th drop down menus at the top of the page.

Ryan Kelley‌ can move this to the appropriate forum for you.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn
Werner_E
25-Diamond I
(To:sdwivedula)

So c is a constant, right.

Create a function f(x,y):=x+y (of course you can also use b and c instead of x and y, if you like).

Create a vector b (NOT a range variable) with the hundred values

Than call a:=f(b,c). If this throws an error or just to be on the safe side, you have to vectorize the function call f(b,c).

How you do this varies depending on the version of Mathcad you use (real Mathcad 15/below or limited Prime).

You can tell its a vectorise call by the arrow over the function call.

Regards Werner

LucMeekes
23-Emerald III
(To:sdwivedula)

Here is an example:

If your b is really supposed to hold 100 elements, I hope you have an algorithm to define its values, or you can read the data from a file.

To use an algoithm:

Success!

Luc

Announcements

Top Tags