%================================================
% 以下程式碼，必須出現在答案中，行向量列向量可轉換。
clear all;close all;clc;
randn('seed',100)
Dat_len = 500;
ts = 0.1;                   % sampling interval
[y,t] = FHprocess('reset');   % initial process
%================================================

for i = 1:Dat_len-1
    M = 0.5;  % manipulated variable
    
    %================================================
    % 以下程式碼，必須出現在答案中，行向量列向量可轉換。
    T1(i) = 100+randn*10;  
    P(i) = 10+ randn; % unmeasued disturbance
    t1 = ts*(i-1); %  Operated process 
    [y_tmp, t_tmp] = FHprocess(t1,M,T1(i),P(i));
    y = [y; y_tmp];
    t = [t; t_tmp];
    %=================================================
end

figure(1)
plot(t,y(:,1));
xlabel('Time points');ylabel('Exit Temp.')

figure(2)
plot(t,y(:,2));
xlabel('Time points');ylabel('Exit Flow Rate.')
