Bonjour à Tous,
je suis entrain de fitter cette équation:
f = fittype('sqrt(r^2-(x-x0)^2-(y-y0)^2)+z0','independent', {'x', 'y'},'dependent', 'z','coefficients', {'x0','y0','r','z0'});
en retour j'obtiens le message:
Error using fit>iFit (line 353)
Complex value computed by model function, fitting cannot continue.
Try using or tightening upper and lower bounds on coefficients.
Error in fit (line 108)
[fitobj, goodness, output, convmsg] = iFit( xdatain, ydatain, fittypeobj, ...
Error in peaks_Cil3_50x_modify_sfera (line 34)
[cfun,gof] = fit([reshape(Xm11(i:i+2*dimframe,j:j+2*dimframe),[],1),...
Est quelqu'un pourrait m'aider car j'ai l'intention de introduire à l'interieur de la fonction "fittype" une condition booleenne, c.à.d
f = fittype( ' if (r^2-(x-x0)^2-(y-y0)^2)<0 then "0" elseif 'sqrt(r^2-(x-x0)^2-(y-y0)^2)+z0' then 'independent', {'x', 'y'},'dependent', 'z','coefficients', {'x0','y0','r','z0'});
est-ce possible ma formulation? car en pratique j'obiens des valeurs complexes quand l'equation est negative pour pallier je pose cette condition boolenne?
est-ce possible, sinon s'il vous plait donnez moi d'autres astuces pour resoudre ce type de problème?
merci à tous.
Partager