ODE Runge Kutta MATLAB error

后端 未结 1 626
再見小時候
再見小時候 2020-12-22 06:47

so I\'m trying to create a Runge Kutta function and this is my code :

function [t,U] = RK(f, n, eta, interv)
h = (interv(2)-interv(1))/n;
t = interv(1):h:in         


        
相关标签:
1条回答
  • 2020-12-22 07:10

    You are using the sin as a function handle. Just add the @ symbol and you're set.

    RK(@sin, 10, [0,1], [5,15])
    
    0 讨论(0)
提交回复
热议问题