%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%Octave:
%Multiple plots as subplots
%
%Finn Aakre Haugen
%University of South-Eastern Norway
%finn.haugen@usn.no
%24 Oct 2018
%
%----------------------------------------------

clear all
close all
format compact

%----------------------------------------------

t=[0:.1:100]';
u=-1+0.02*t;
y=sin(0.2*t);

%Plotting in 2x1 subplots:
subplot(2,1,1)
plot(t,y)
grid minor on
ylabel('y')
title('This is subplot (2,1)')

subplot(2,1,2)
plot(t,u)
grid minor on
xlabel('t [sec]')
ylabel('u')
title('This is subplot (2,2)')
