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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

4-Participant

## Need help with pwrfit function

Hi,
I am trying to solve the following problem. I am new to pwrfit function. This is the first time trying to solve such a problem.

1. Select a power fit in Mathcad to fit this data and model the metabolism rate as a function of the mass of the animal. Notice that pwrfit(vx, vy, vg) returns a vector containing the coefficients for a power curve of the form y(x)= axb+c that best approximates the data in vx and vy using guess values in vg.
2. Determine the R2 value for this fit.
3. Considering the fit is good, use the equation to predict the metabolism rate of a 500-kg manatee.

1 ACCEPTED SOLUTION

Accepted Solutions
21-Topaz I
(To:engr_mkhalid)

Hi,

It is not necessary to reverse the vectors but it is more natural with left hand point being left hand point on the graph.

3 REPLIES 3
21-Topaz I
(To:engr_mkhalid)

Hi,

It is not necessary to reverse the vectors but it is more natural with left hand point being left hand point on the graph.

4-Participant
(To:terryhendicott)

Thank you soo much for explanation!

24-Ruby V
(To:engr_mkhalid)

The first error in your screenshot (you should always attach the Prime sheet as well if ever possible) is because you defined vx and vy as row vectors, but pwrfit only accepts column vectors. You can see in Terry sheet that the transpose operator does the trick.
In your approach the variable a would be a 3x1 vector, containing the best fitting values for the function arguments a, b and c. Its better to assign the result of pwrfit to an appropriate vector right ahead as you can see in Terrys sheet.

You then did not try to use the results of pwrfit in any way??

You may also use "genfit" to try a fit with any user defined function. See here two examples compared to the result of pwrfit

At the end of your screenshot - did you try to calculate something like this?

Here some plots comparing the three regressions

Announcements
Top Tags