Problem with fzero()?

1 次查看(过去 30 天)
Learner
Learner 2018-5-12
clc
clear all
close all
CStrain = 0.001536;
eps_i = 0.00192;
f_i = 377.76;
fy = 425;
Es = 200000;
eps_y = fy/Es;
PointTB = [eps_i, f_i];
eps_n = 0.0018777;
eps_p = (PointTB(1) - eps_n)/eps_n;
Kp = eps_p/eps_n;
A = 1.9*(Kp)^(-0.1);
R = 10*(Kp)^(-0.2);
% xfun = @(x) x^2 + 2*x - 4;
% x = fzero(xfun,1)
xfun = @(x) (CStrain - eps_i) - ((x - fy)/Es)*(1 + (A^(-R))*((x - f_i)/fy)^(R-1));
x = fzero(xfun,1)
In the above mentioned code, I do not know the initial guess in fzero() function, hence I gave as "1", but the program is returning a error, as shown below
Error using fzero (line 309)
Function value at starting guess must be finite
and real.
Error in Rough (line 27)
x = fzero(xfun,1)
Could anyone please help me how to solve the problem and get the value of "x".
Thanks in advance...

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Optimization 的更多信息

产品


版本

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by