Professional Documents
Culture Documents
Eric Hamke
March 28, 2015
Getting Ready
Falling
during:
[ p <= 0 && v < 0 ]
% derivatives
{
p_dot = v;
p = 0;
v_dot = -9.81;
v = -0.8.*v;
% outputs
}
p_out = p_dot*delta_t;
v_out = v_dot*delta_t;;
y
1
x
10
a b
Exponentially Distributed Number
• Similar formula exists for converting these numbers into
numbers that are exponentially distributed set
y = rand(100000,1);
mu = 0.6;
[n c] = hist(y,100);
x = -mu*log(1-y);
bar(c, n/sum(n));
xlabel('y')
[n c] = hist(x,100);
ylabel('Relative Frequency')
bar(c, n/sum(n));
title('rand(100000,1) Output')
xlabel(‘\mu*x')
ylabel('Relative Frequency')
print -f1 -dpng
title('Transformed Output, using \mu = 0.6')
11
Create Exponential Values Generator
12
Encapsulate Repair Time System
13
Inserting Stateflow Block
14
Creating the Stateflow Model
15
Creating In/Out Ports in Stateflow
16
Creating Ports in Stateflow
18
Creating Out Ports in Stateflow
20
Implementing State Machine
21
Implementing State Machine
(Continued)
A default transition on
chart entry is required.
This identifies the initial
state of the state
machine.
23
Running the Model
24
One Robot Model