Fit operation with defined variables
Mostra commenti meno recenti
Hi there. I have the following example of code:
mydata_x = random_data % isn't important how data i have
mydata_y = random_data
a = 10;
b = 0.5;
c = 3;
To calculate the fit of mydata I use to calculate d:
[fit1,gof1] = fit(mydata_x,mydata_y,'(10-0.5.*x.*d)/(3+0.5.*x.*d)');
There is a way to substitute 10,0.5 and 3 with the equivalent vaiables: a,b and c; like the following code:
[fit1,gof1] = fit(mydata_x,mydata_y,'(a-b.*x.*d)/(c+b.*x.*d)');
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Get Started with Curve Fitting Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!