Hi, I am working on a class project and need help using Matlab as I have no experience with it. For the project I am supposed to do a Euler approximation of a function, 3x^2+y, and y(0)=1. Step size is .01, supposed to get to x=2. My code so far is:
h=0.01;N=200;y(1)=1;for n=1:Ny(n+1)= y(n)+h*((3x^2)+y(n));x(n+1)=n*h;endplot(x,y)
But I keep getting the error: Error: Unexpected MATLAB expression Help? Please?
Best Answer