next up previous
Next: State Space Example Up: Examples Previous: Difficult Example

State Space Example

This one allows the user to update every single parameter inside a set of fifth order state space matrices having two inputs and one output.

Figure 3.4: State Space Example. This example uses both rows and columns randomly for different effects
\includegraphics[width=\textwidth]{Figures/state_space.eps}

# More complicated project. This one uses a combination of columns
# and rows to achieve a different effect

# first the required information
inputs 2                  # two inputs
outputs 1                 # one output
data_size 3               # transfer all inputs and outputs

# then let's build our window
start_col n
      label  'A Matrix'
      start_row h
        spin_with_label 'A(1.1)',-100,100,10,0 
        spin_with_label 'A(1.2)',-200,200,20,1 
        spin_with_label 'A(1.3)',-200,200,20,2 
        spin_with_label 'A(1.4)',-200,200,20,3 
        spin_with_label 'A(1.5)',-200,200,20,4 
      end_row
      start_row h
        spin_with_label 'A(2.1)',-300,300,30,5 
        spin_with_label 'A(2.2)', 0, 20, 3, 6 
        spin_with_label 'A(2.3)', 0, 20, 3, 7  
        spin_with_label 'A(2.4)',-200,200,20,8 
        spin_with_label 'A(2.5)',-200,200,20,9 
      end_row
      start_row h
        spin_with_label 'A(3.1)',-300,300,30,10 
        spin_with_label 'A(3.2)', 0, 20, 3, 11  
        spin_with_label 'A(3.3)', 0, 20, 3, 12  
        spin_with_label 'A(3.4)',-200,200,20,13 
        spin_with_label 'A(3.5)',-200,200,20,14 
      end_row
      start_row h
        spin_with_label 'A(4.1)',-300,300,30,15 
        spin_with_label 'A(4.2)', 0, 20, 3, 16  
        spin_with_label 'A(4.3)', 0, 20, 3, 17  
        spin_with_label 'A(4.4)',-200,200,20,18 
        spin_with_label 'A(4.5)',-200,200,20,19 
      end_row
      start_row h
        spin_with_label 'A(5.1)',-300,300,30,20 
        spin_with_label 'A(5.2)', 0, 20, 3, 21  
        spin_with_label 'A(5.3)', 0, 20, 3, 22  
        spin_with_label 'A(5.4)',-200,200,20,23 
        spin_with_label 'A(5.5)',-200,200,20,24 
      end_row
      h_separator
      label 'C Matrix'
      start_row h
        spin_with_label 'C(1.1)',-300,300,30,25 
        spin_with_label 'C(1.2)', 0, 20, 3, 26 
        spin_with_label 'C(1.3)', 0, 20, 3, 27 
        spin_with_label 'C(1.4)',-200,200,20,28 
        spin_with_label 'C(1.5)',-200,200,20,29 
      end_row
end_col

v_separator

start_col n
      label  'B Matrix'
      start_row n
        start_col h
          spin_with_label 'B(1.1)',-100,100,10,30  
          spin_with_label 'B(2.1)',-200,200,20,31  
          spin_with_label 'B(3.1)',0,2000,100,32   
          spin_with_label 'B(4.1)',-200,200,20,33  
          spin_with_label 'B(5.1)',0,2000,100,34   
        end_col
        start_col h
          spin_with_label 'B(1.2)',-100,100,10,35  
          spin_with_label 'B(2.2)',-200,200,20,36  
          spin_with_label 'B(3.2)',0,2000,100,37   
          spin_with_label 'B(4.2)',-200,200,20,38  
          spin_with_label 'B(5.2)',0,2000,100,39   
        end_col
      end_row
      h_separator
      label 'D Matrix'
      start_row h
          spin_with_label 'D(1.1)',-100,100,10,40  
          spin_with_label 'D(1.2)',-100,100,10,41  
      end_row
     
end_col



Michael Barabanov 2001-06-19