p3: matlab/p3.m file
This commit is contained in:
parent
ac4a8551d2
commit
84e2858776
23
p3/matlab/p3.m
Normal file
23
p3/matlab/p3.m
Normal file
@ -0,0 +1,23 @@
|
||||
cd ~/src/utb/ak9im/ak9im/p3;
|
||||
|
||||
%% load model
|
||||
%load('data/task3.slx');
|
||||
%load("data/u.csv");
|
||||
|
||||
|
||||
step(1, [2 5 1])
|
||||
|
||||
%% run the simulation in simulink
|
||||
len_u = length(u);
|
||||
len_y = length(y);
|
||||
|
||||
%% save data
|
||||
% cd ~/src/utb/ak9im/ak9im/p2/data/;
|
||||
m = [out.u, out.y];
|
||||
% writematrix(m, 'data/m.csv')
|
||||
|
||||
%% plot input/output signals.
|
||||
plot([1:len_u],out.u)
|
||||
plot([1:len_y],out.y)
|
||||
|
||||
[n d] = c2dm(1, [2 5 1], 1);
|
Loading…
Reference in New Issue
Block a user