Handouts and Code from Class

Read the following carefully for course policies, procedures and handouts.
Post Reply
goodwine
Site Admin
Posts: 1596
Joined: Tue Aug 24, 2004 4:54 pm
Location: 376 Fitzpatrick
Contact:

Handouts and Code from Class

Post by goodwine »

  • twomass.m and twomassrhs.m from Monday 2/21.
  • ex1.m, ex1rhs.m, ex2.m from Friday, 2/25.
  • LQR programs from 3/2:
    • lqrex.m
    • threelqr.m
    • threelqrrhs.m
    • The command line stuff:

      Code: Select all

      sys = ss(A,B,C,D)
      [K,S,E] = lqr(sys,Q,R,[0 0 0 0 0 0]')
      threelqr
      close
      threelqr
      [K,S,E] = lqr(sys,10*Q,R,[0 0 0 0 0 0]')
      threelqr
      close
      threelqr
      lqrex
      Q(3,3) = Q(3,3)*40
      [K,S,E] = lqr(sys,Q,R,[0 0 0 0 0 0]')
      threelqr
  • Checking solutions with discontinuous forcing (3/11/11):

    Code: Select all

    close;
    clear;
    
    [t,y] = ode45(@stepfuncrhs,[0 5],[1]);
    plot(t,y);
    hold on;
    
    t = linspace(0,5,1000);
    myy = exp(-t) + (t-1).*(t>1) - (t-1-exp(-(t-2))).*(t>2);
    plot(t,myy,'r');

    Code: Select all

    function xdot = stepfuncrhs(t,x)
    if(t>1 & t<2)
        f = t;
    else
        f=0;
    end
    xdot = -x+f;
    
    end
  • Block diagram algebra example problems from 4/3.
Bill Goodwine, 376 Fitzpatrick
cdiberna

Re: Handouts and Code from Class

Post by cdiberna »

What are C and D? There doesn't seem to be anything about what they are in your code.
goodwine
Site Admin
Posts: 1596
Joined: Tue Aug 24, 2004 4:54 pm
Location: 376 Fitzpatrick
Contact:

Re: Handouts and Code from Class

Post by goodwine »

cdiberna wrote:What are C and D? There doesn't seem to be anything about what they are in your code.
I wrote that on the board and it's too long to go into it here. They won't affect your answer.
Bill Goodwine, 376 Fitzpatrick
Post Reply

Return to “Course Administration”