'입력 인수가 부족합니다' 이 오류를 해결하고 싶어요.
显示 更早的评论
syms ('x')
xo=2000;
tolerance=0.03;
Re=1.0;
fid=fopen('solution1.txt', 'w');
while Re>tolerance
assignment2v=assignment2_2f(xo);
assignment22v=assignment2_2ff(xo);
xn=xo-assignment2v/assignment22v;
Re=abs((xn-xo)/xo);
fprintf(fid, 'approx. solution is : x=5.2%f\n', xn);
xo=xn; fo=fn; ffo=ffn;
end
fprintf(fid, 'The coverged solution is : x=5.2%f\n', xo);
type solution1.txt
----------------------------
function y=assignment2_2f(x)
y=x/400+10.245*sin(4.4934*x/4000)-2;
end
---------
function g=assignment2_2ff(x)
g=diff(assignment2_2f,x);
end
-----------------------------
assignment2_2
입력 인수가 부족합니다.
오류 발생: assignment2_2f (2번 라인)
y=x/400+10.245*sin(4.4934*x/4000)-2;
오류 발생: assignment2_2 (6번 라인)
fo=int(assignment2_2f,xo); ffo=int(assignment2_2ff,xo);
3 个评论
Dyuman Joshi
2024-4-10
Definite integration requires two limits, where as you have provided only a single limit -
fo=int(assignment2_2f,xo); ffo=int(assignment2_2ff,xo);
What are you trying to do? Please specify.
gyul
2024-4-10
Dyuman Joshi
2024-4-10
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Bartlett 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!