Dear MathWorks Community,
I am trying to use bvp4c/bvp5c and I always get the error:
"Error using char/eps
Too many input arguments.
Error in decomposition/isIllConditioned (line 600)
isIllCond = rc < eps('like',rc) || isnan(rc);
Error in bvp4c (line 196)
if isIllConditioned(dPHIdy)
Error in bratubvp (line 10)
sol1 = bvp4c(@bratuode,@bratubc,solinit,options);"
The code that I am trying to run is the bratubvp.m that is taken from:
Any example that I am trying to run I always get the same error above. I am wondering whether someone else has run into a same issue and whether this can be resolved or not.
Thank you in advance for your help!

 採用された回答

Torsten
Torsten 2022 年 11 月 29 日

0 投票

Did you create a function with name "eps" ? Then you should rename it because "eps" is an internal MATLAB function.

5 件のコメント

Efstathios Charalampidis
Efstathios Charalampidis 2022 年 11 月 29 日
Dear Torsten,
Thank you for your reply and help.
Looking at this function, it appears that I have not created any function with name "eps". A quick look in MATLAB shows that:
>> which eps
built-in (/home/stathis/Documents/MATLAB/R2022b/toolbox/matlab/elmat/eps)
Do you have any other suggestions?
Many thanks in advance for your help.
All the best,
Stathis.
Torsten
Torsten 2022 年 11 月 30 日
Do you have the same problems with this test code ?
If yes: what is the exact error message ?
xmesh = linspace(0,pi/2,5);
solinit = bvpinit(xmesh, @guess);
sol = bvp4c(@bvpfcn, @bcfcn, solinit);
plot(sol.x, sol.y, '-o')
function dydx = bvpfcn(x,y)
dydx = [y(2);-y(1)];
end
function res = bcfcn(ya,yb)
res = [ya(1);yb(1)-2];
end
function g = guess(x)
g = [sin(x);cos(x)];
end
Efstathios Charalampidis
Efstathios Charalampidis 2022 年 11 月 30 日
Dear Torsten,
The error is the same as before:
Error using char/eps
Too many input arguments.
Error in decomposition/isIllConditioned (line 600)
isIllCond = rc < eps('like',rc) ||
isnan(rc);
Error in bvp4c (line 196)
if isIllConditioned(dPHIdy)
Error in untitled (line 3)
sol = bvp4c(@bvpfcn, @bcfcn, solinit);
Torsten
Torsten 2022 年 11 月 30 日
What is the output of
which -all eps
?
What is
char/eps
?
Efstathios Charalampidis
Efstathios Charalampidis 2022 年 11 月 30 日
Dear Torsten,
I was able to locate the error. I have installed the advanpix package (for multi-precision computing), and the flag "-all" gave me a hint about it. Thanks a lot!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by