cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead 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

Need help with pwrfit function

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

engr_mkhalid_0-1698054667440.png

engr_mkhalid_1-1698054696274.png

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

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.
Capture.JPG

View solution in original post

3 REPLIES 3

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.
Capture.JPG

Thank you soo much for explanation!

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

Werner_E_2-1698074282757.png

 

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

Werner_E_1-1698073244829.png

 

Here some plots comparing the three regressions

Werner_E_3-1698074394390.png

 

Top Tags