I am not getting anything related to P_Measure.IAE = trapz(t, abs(e));
I used the code below:
clear all;
close all;
%% define num and den of tf
%Gp defining
num=[0.8];
den=[10 1];
Gp=tf(num,den,'IODelay',9)
%Gc defining
kc=(0.5*10)/(0.8*9);
Ti=10;
Gc=kc+tf([kc],[Ti]);
%defining Gd
Gd=tf([-4],[1 15], 'IODelay',9)
% close loop transfer function
%change in set point
GCL1=Gc*Gp/(1+Gc*Gp)
GCL1= minreal(GCL1)
%disturbnance
GCL2=Gd/(1+Gc*Gp)
GCL2= minreal(GCL2)
% Simulate closed loop tranfer function
T_Final = 100;
[y1, t1] = step(Gp, T_Final)
[y2,t2]=step(GCL1,T_Final)
[y3,t3]=step(GCL2,T_Final)
[y4,t4]=step(Gd,T_Final)
plot(t2,y2,'k','linewidth',2)
hold on
plot(t3,y3,'y','linewidth',2)
hold on
plot(t1,y1,'m','linewidth',2)
hold on
plot(t4,y4,'c','linewidth',2)
hold off
legend('Setpoint changes','Disturbance changes', 'Gp', 'Gd')
ylabel('output')
xlabel('time(min)')
%
G = 1 / (1 + Gc * Gp);
T_Final=100;
function [P_Measure] = Performance(G, T_Final);
[e, t] = step(G, T_Final);
P_Measure.IAE = trapz(t, abs(e));
end