I have data stored for N=1000
elements (air conditioners, ACs).
Each element has a number of characteristics, mainly their temperature, and the binary state of the ON/OFF switch. All this data is already generated and stored in the following way:
- Each AC is an entry in a
cell
array. - Each AC has a different deadband temperature
limits_deadband
(this is an entry of the uppercell
array). - For the temperature I have another
cell
array with a vector from a simulation, of dimension8641x1
. - For the ON/OFF binary state I have another
cell
array with a vector from a simulation, of dimension8641x1
.
What I would like to generate is the following:
- Divide
limits_deadband
for each AC intoN/2
bins (say20
for example). - Then use
N
to represent the temperature and the ON/OFF status. - Plot the number of ACs in each bin and ON/OFF status over the measured
8641
data points.
What I have so far:
load(['my_data.mat']);
%% 1) Divide the deadband of each EWH into N_bin bins
%
% number of bins
N_bin = 20;
limits_deadband = cell(1,1000);
ON_OFF_state = cell(1,1000);
for ii = 1:1000
% get the limits for the 20 bins of the deadband
limits_deadband{ii} = linspace(0,Params.T_dead(:,:,ii),N_bin + 1);
% add the temperature set-point
limits_deadband{ii} = limits_deadband{ii} + Params.T_set(:,:,ii);
% ON/OFF state of the internal switch for an entire day
ON_OFF_state{ii} = Results_comparison.urec(1,:,ii);
end
limits_deadband
are the edges of the bins in which I would like to store the temperatures.
ON_OFF_state
gives the state.
Any ideas on how to plot this properly? I thought using histogram
, but not sure on how to do this.