I am considering an energy signal in MATLAB as I am going through the book Signals and Systems Laboratory with MATLAB by Alex Palamides.
My Matlab code is below:
clc;clear;close all
syms t T
x=heaviside(t)-heaviside(t-1);
d=int(abs(x)^2,t,-T,T);
Px=limit((1/(2*T))*d,T,inf)
Ex=limit(d,T,inf)
I have also attached of my output and relevant problem from book