Problem with fzero()?

7 Ansichten (letzte 30 Tage)
Learner
Learner am 12 Mai 2018
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...

Antworten (0)

Kategorien

Mehr zu Problem-Based Optimization Setup finden Sie in Help Center und File Exchange

Produkte


Version

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by