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

조회 수: 2 (최근 30일)
Jaden Lee
Jaden Lee 2019년 7월 19일
편집: Stephan 2019년 7월 19일
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.

답변 (1개)

Stephan
Stephan 2019년 7월 19일
편집: Stephan 2019년 7월 19일
you should rewrite your function as f=d(P) with known constants (R) and use lsqcurvefit using P as xdata and d as ydata.

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by