Clear Filters
Clear Filters

how to solve the error in Lsqcurvefit

1 view (last 30 days)
Sou Fat
Sou Fat on 14 Apr 2023
Answered: Sou Fat on 14 Apr 2023
hi guys
i need help for the error i got it , with the function lsqcurvefit, i don't know exactely how to solve this probleme.
Thank you,
this is my script:
clear all
clc
load('RCS1190_460A.mat')
xdata=Times;
i=460
%% RCS1190_460A %%%%%%%%%%%%%%%%%ù
ydata= QC_plusC-45;
fun=@(x,xdata)((x(1)./x(2)).*( 1- (exp(-(x(2)).*xdata))))
x0=[2,1]
x=lsqcurvefit(fun,x0,xdata,ydata)
  13 Comments
Sou Fat
Sou Fat on 14 Apr 2023
I rectified in the tebalu that it misses a value I rectified it then I verified the two any(isnan(fun(x0,xdata)))
any(isinf(fun(x0,xdata))) and fo ydata which return 0

Sign in to comment.

Answers (1)

Sou Fat
Sou Fat on 14 Apr 2023
Yes I didn't find the error thank you for your help

Categories

Find more on Get Started with Optimization Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!