Fitting data into a required function
Afficher commentaires plus anciens
I am trying to fit this data -
x = [0.001 0.01 0.1 1 10];
y = [63.5 74.5 94.1 94.2 103.5];
into a function y = m*x^n
polyfit and lsqcurvefit not seem to be working here
can someone help me?
Réponse acceptée
Plus de réponses (1)
randerss simil
le 13 Fév 2021
Modifié(e) : randerss simil
le 13 Fév 2021
%if true
m = 2
n = 1.5
Y = m*x.^n;
k = polyval(x,Y)
First use polyval for the equation and then apply polyfit
Catégories
En savoir plus sur Get Started with Curve Fitting Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!