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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!