• Matlab Homework 1, due Sept. 28 in discussion session. You can work in a team of up to three students (all three must have the same TA).
    You need to download m-file dirfield.m (see below). Note that updated version of dirfield is available now.
    Hint for problem 2(b): To solve the initial value problem from t=0 to t=-5 use ode45(f,[0,-5],y0).
    Hint for problem 3(b),(c),(d): E.g., assume that psi(t,y) = t2 + y2 and that the initial condition is y(3)=-4. We want to find y(2) using fzero:
       syms t y             
       psi = t^2 + y^2    
       ezcontour(psi,[-5 5 -5 5])      % plot contours of psi for t in [-5,5], y in [-5,5]  
       C = subs(psi,{t,y},{3,-4})      % substitute t=3 and y=-4 in psi  
       F = subs(psi-C,t,2)             % substitute t=2 in psi-C
       fzero(inline(vectorize(F)),-5)  % find y such that F=0, near y=-5 
    Note that inline(vectorize(F)) turns the symbolic expression F into a function which fzero understands.