Hi Hammad,
I understand that you want to calculate the mean of the ‘GeneralCycle’ array.
To calculate the mean of an array, you can use the ‘mean’ function in MATLAB as shown in the edited part of the code below:
GeneralCycleCellArray{k} = GeneralCycle;
% Calculate the mean of GeneralCycle
meanofcyc = mean(GeneralCycle);
% Store the mean value in the cell array
meanofcycCellArray{k} = meanofcyc;
plot(meanofcyc, 'g');
The above code calculates the mean of the GeneralCycle and stores it in a cell array ‘meanofcycCellArray’. You can plot the mean using the plot function.
For more information on the ‘mean’ function, refer to the following documentation: