From: James Shaw on 28 Jul 2010 01:49 Hi, I'm VERY new too MatLab and need it to test some audio file related ideas. first of all I've read wav files in using wavread(), obviously this isn't entirely useful by itself. Then I times them by the bit resolution. I need to break it up into blocks of size 12288. but in such a way that the indexing goes a = [0,12288] b = [4096, 16384] //+ 4096 c = [8192, 20480] //+ 4096 .... .... until end of file. The array names don't have to be a,b,c,d,etc. It would be better if I could reference them easily later on.
From: Darren Rowland on 28 Jul 2010 04:42 James, If you are processing the blocks one at a time you might want to just grab the chunk you need without storing all the blocks i.e. blockLength = 12288 for ix = 1:nBlocks blockStart = (ix-1)*4096; blockEnd = blockStart + blockLength; currentBlock = W(blockStart:blockEnd); % Do some processing on the current block end where W is the result from wavread. Hth, Darren
|
Pages: 1 Prev: Mean of an image Next: Volume calculation for a 4d matrix |