I have the following function typed in MATLAB:
function [TOUT,YOUT] = modifiedeuler(ODEFUN,TSPAN,Y0,N)
YOUT(1) = Y0;
TOUT(1) = TSPAN(1);
h = (TSPAN(2)-TSPAN(1))/N;
for i = 1:N
YOUT(i+1) = YOUT(i) + h*ODEFUN(TOUT(i),YOUT(i));
TOUT(i+1) = TOUT(i) + h;
However I need to have a WHILE loop in it, if need be the FOR statement can be removed. The WHILE LOOP should be able to solve an ODE using modified euler's method
MATLAB question and code required. Thank you.
Recently Asked Questions
- What is the primary reason given by Coase for the why it is often profitable to establish firms?
- 8. For a certain normal distribution, σ = 8, about 20% of all scores are less than 83. What is the mean of the distribution (10 points)?
- A monopoly firm always earns economic profit? True or False An increasing cost industry is an industry in which average total cost decreases as industry output