diff --git a/p3/matlab/p3.m b/p3/matlab/p3.m new file mode 100644 index 0000000..2d32ca7 --- /dev/null +++ b/p3/matlab/p3.m @@ -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);