Split raw data into min,hour,days,customer - help matrix - data provided along with code.[Quick One]

1 次查看(过去 30 天)
Hi
I have 137241 data in 1 column. the data is voltage of 5 households (3-phase). I want a matrix out of it showing me: 10 x 24 x days x 15
my code is:
ncust = size(x,2);
% pad data with one extra row
x = [x;zeros(1,ncust)];
% reshape data into hour/day/customer
x = reshape(x,10,24,[],ncust);
% average across days
k1 = squeeze(mean(x,2));
% plot the average for the first five customers
% plot(0:23,k1(:,1:1))
% Split data into weekdays (2:6) and weekends (1 & 7)
daynum = mod(1:size(x,2),7);
isweekend = (daynum==2) | (daynum==3);
x_weekday = x(:,~isweekend,:);
x_weekend = x(:,isweekend,:);
and the data is attached :)
i hope a kind soul will help me :)
thanks alot

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by