Problem with fzero()?

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개)

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

릴리스

R2015a

질문:

2018년 5월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by