How do I solve for three unknown parameters using only one constraint equation?

3 vues (au cours des 30 derniers jours)
Jaden Lee
Jaden Lee le 19 Juil 2019
Modifié(e) : Stephan le 19 Juil 2019
I need to solve the equation above for the variables ,, and in order to apply a curve fit to adisplacement-loading data, given that I know R and have data for d and P.
I understand that MATLAB has a function called fsolve to solve nonlinear equations like this, but when I run the follow program:
R = 400590;
% Moved d and d0 to right side to set expression = 0:
fun = @(x) x(1).^2/R*((1 + sqrt(1 - Load./x(3)))/2).^(4/3) - 2/3*x(1).^2./R*...
((1 + sqrt(1 - Load./x(3)))/2).^(1/3) + x(2) - Depth; % x(1) = a0, x(2) = d0, x(3) = P_adh
% Allocated an empty array to start algorithm guessing
x0 = zeros(1,3);
x = fsolve(fun,x0);
I get the following errors:
Warning: Trust-region-dogleg algorithm of FSOLVE cannot handle non-square systems; using
Levenberg-Marquardt algorithm instead.
> In fsolve (line 310)
In nanoAnalysis (line 46)
Error using levenbergMarquardt (line 16)
Objective function is returning undefined values at initial point. fsolve cannot continue.
Error in fsolve (line 417)
levenbergMarquardt(funfcn,x,verbosity,options,defaultopt,f,JAC,caller, ...
Error in nanoAnalysis (line 46)
x = fsolve(fun,x0);
I think that the error has something to do with undefined values at initial point, suggesting that I need to guess positive values for the array x0 instead of pre-allocating a zeros array. I would appreciate if somebody could confirm this or suggest a way to non-linearly solve for the three parameters I specified. Thank you for your time.

Réponses (1)

Stephan
Stephan le 19 Juil 2019
Modifié(e) : Stephan le 19 Juil 2019
you should rewrite your function as f=d(P) with known constants (R) and use lsqcurvefit using P as xdata and d as ydata.

Community Treasure Hunt

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

Start Hunting!

Translated by