I have a very simple problem.
I have
x=[ 10 25 50];
y=[ 1.2 3 7.5];
I know my curve fitting function
f(x)=(a*x+1)/(bx+c);
How can I get coefficient(a,b,c) solve in matlab and also plot this curve?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Rearrange y = f(x) to make a, b, and c the unknowns:
This describes a system of simultaneous linear equations in a, b, and c when you substitute your three paired values of x and y.
Now you have the coefficients a, b, and c so you can plot the function.
Addendum: plotting
To plot a function, first choose the x-values of the data points
Then calculate the y-values (assuming you’ve already got a, b, c)
Then just plot them!
Read the Matlab help on the plot function for customizing the style of the plot.