フィルターのクリア

Undefined function 'euler' for input arguments of type 'function_handle'.

2 ビュー (過去 30 日間)
Eduard Lucas
Eduard Lucas 2016 年 3 月 10 日
編集済み: Stalin Samuel 2016 年 3 月 10 日
Why does the program say "Undefined function 'euler' for input arguments of type 'function_handle'. " to this code?
function dydx = funct(x)
dydx = 4/(1+x^2);
end
function euler(func,y0,h,x0,xf)
x=linspace (x0,xf,h)
y=(y0)
for k=1:(length(x)-1)
y(k+1) = y(k)+h*func(x(k));
end
y=y'
x=x'
plot (x,y)
xlabel ('x')
ylabel ('y')
end
When in the Comand Window I type: euler(@funct,0,20,0,1)

採用された回答

Stalin Samuel
Stalin Samuel 2016 年 3 月 10 日
編集済み: Stalin Samuel 2016 年 3 月 10 日
  • download the attached files and save in your working directory
  • Now execute euler(@funct,0,20,0,1) from your command window

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by