who can help me write matlab codes for curve fitting?

I want to fit these 25 curves.who can write codes for me? my curve fitting function is f(x)=a+b/(1+(d*x)^c)

Antworten (2)

Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh am 12 Aug. 2014

0 Stimmen

Hi Ming,
Try to read your xlsx data using this command "xlsread"
type 'doc xlsread' in matlab command line to see its details.
Then type 'cftool' so that matlab curve fitting toolbar opens you can chose your fit, and when you're satisfied you can go to 'File > Generate Code' and save it as an .m file.
Then take a look inside the created m file and i'm sure you'll learn how to do it without curve fitting interface ;)
Good Luck!

4 Kommentare

Ming
Ming am 12 Aug. 2014
I know the method,but I want to automatically deal with these curves(not one curve at one time),what can I do?
Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh am 13 Aug. 2014
Bearbeitet: Salaheddin Hosseinzadeh am 13 Aug. 2014
What do you mean "not one curve at one time"?!!!
You've to do things step by step one at a time when you're programming!
You've to fit every single data sample one at a time! You just have to make an iterative program to run the same code for each set of data, one by one!
Just learn how to do it for one set of data, then put whatever your code is in a loop and apply the required adjustments.
I think ppl tagged your question quite well.
Ming
Ming am 13 Aug. 2014
I just do not know how to write a loop for this program.
Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh am 13 Aug. 2014
Bearbeitet: Salaheddin Hosseinzadeh am 13 Aug. 2014
Could you successfully read the xls file and create 25 set of data?

Melden Sie sich an, um zu kommentieren.

Pratik Bajaria
Pratik Bajaria am 13 Aug. 2014

0 Stimmen

Hello, Please go though the 'fit' and 'polyfit' function help in matlab. These might address your query. http://www.mathworks.in/help/curvefit/fit.html and http://www.mathworks.in/help/matlab/ref/polyfit.html and the corresponding related functions too.
Please let me know in case of any further queries.
Regards, Pratik

Kategorien

Mehr zu Descriptive Statistics finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 12 Aug. 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by