Help with creating new column inside a matrix with new data.
이전 댓글 표시
Dear matlab users
i have a matrix of 1511x65 double called x. it has 1511 rows and 65 columns...each column is representing a customer and the 1511 represnts 63 days of power usage with 1 hour for each data obtained. so 1511 / 24 = 63 days.
i made this code to make a graph for each or total of the customers with 24 hours of each customer. Meaning: u will see at clock 3 pm there will be alot of data on 1 row all occured in that time line but different day.
tid = [0:23]';
n = 0;
while(n<2) %%control how much of the data you wanna plot
n = n + 1;
for i=1:size(x,2)
k = x(:,n);
trow = 24;
tcol = ceil(length(x)/trow);
k1 = [k;0];
k1 = reshape(k1,trow,tcol);
k1 = mean(k1,2); %%taking the mean of the current chosen data from while loop
% plot(tid,k1)
% hold on
end
end
The first Question is now: it all works..but HOW do i make it so it creates 1 column for each of the customer for 24 hours...so the matrix in end is: 24x64.
the second question: what if i wanted to filter out weekends out of the data set and work seperately with week days and weekends.
i include hereby the data called x.
thanks for help
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Calendar에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!