I'm making signal processing using qt ,I set up the desired the format like this:
You're using i
to index YVectorRight , but you step up i
with 2 every iteration, so you'll skip every second index.
I.e. you have a typo.
for ( int i = 0, j = 0; i < countSamples ; ++j) {
YVectorRight[j] =Samples[i++];
// ^^
// use j here, not i
YVectorLeft[j] = Samples[i++];
}