Burgers equation using finite differeance and Runge-Kutta 4
Show older comments
I'm solving for a the pde u_t=alpha*u_xx+beta*u*u_x
in the file called evers_code.m I solved for the pde using ode45,however it wouldn't calculate for negative alpha and beta. I'm not to sure why ode45 doesn't allow me to do this.
I have now tried to merge my function called odes(t,y) from file "evers_code.m" with a running RK4 in file "rk4.m".
I keep getting a errors that say
""Index exceeds matrix dimensions.
Error in Burgers_Draft>odes (line 44) yp(1)=u(2);
Error in Burgers_Draft (line 16) f=fxt(T,xrk);""
I need help debugging the code to get it running
1 Comment
Jim Riggs
on 26 Jul 2018
It appears to me that "f" is being used as a function inside the "for" loop, but it is not defined as a function.
Answers (0)
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!