Unable to perform assignment because the indices on the left side are not compatible with the size of the right side. What does this mean?
Error in segment(n_start)=data(n_start:(n_start+ window_size-1));
%% input data matrix
DDD=load('data2.mat');
data=DDD.data;
N_max=length(data);
window_size=256*3; %% 256 for 1 second ==> 3 seconds
step_win=128*3; %% overlapping window ...by 50%
segment=zeros(4798,768);
count=0;
for n_start = 1:step_win:(N_max-window_size)
count=count+1;
segment(n_start)=data(n_start:(n_start+ window_size-1));
end
plot(Segment)
xlabel('time')
grid on;
title('data of channel1');
Segment(n_start)
where you're trying to fit a 768-element vector into a single array element. I don't think that's what you want to do. Also, you should check your variable names. You initializesegment
but assignSegment
. Those are not the same. – beakersegment=zeros(4798,768)
to be filled each time the loop iterate – gehan