splitting a signal
Show older comments
I am having 20 signals each of 24sec.I want to split it into 2 equal halves.(for example if i am having 20 signals it should be divided into two halves of 40 signals) i tried with indexing method i.e. i have used (1:end/2). It displays only the first half signal. It is not considering the second half.Please suggest me how to split a signal.
Accepted Answer
More Answers (1)
Wayne King
on 26 Oct 2011
The question is how do you want to split them. It sounds like you want them into the first half and second half. Assuming your signals are in columns of your matrix.
X = randn(100,20);
X1 = X(:,1:size(X,2)/2);
X2 = X(:,size(X,2)/2+1:end);
1 Comment
pravena duplex
on 26 Oct 2011
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!