Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TAREA10
- --------------------------------------------------------------------------------------
- EJERCICIO 1)
- %%%%%%%%%% ARCHIVO 'f.m' %%%%%%%%%%%%%%%
- function xdot = f (x,t)
- xdot=-exp(-t)*x^2;
- endfunction
- %%%%%%%%%% CONSOLA OCTAVE %%%%%%%%%%%%%%
- > x=lsode("f",2,(t=linspace(0,5,50)'));
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- a) RECONSTRUIR LA ECUACION:
- x'(t) = -e(-t)*x^2(t) ; x(0) = 2
- b) GRAFICAMOS EN EL INTERVALO (0,5)
- << https://imgur.com/a/kC4C6RW >>
- --------------------------------------------------------------------------------------
- EJERCICIO 2)
- %%%%%%%%%% CONSOLA MATLAB %%%%%%%%%%%%%%
- >> f=inline('x*y^2+y');
- >> [x,y] = ode45(f,[0 0.5],1);
- >> plot(x,y)
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- GRAFICO:
- << https://imgur.com/a/qajQv93 >>
- --------------------------------------------------------------------------------------
- EJERCICIO 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement