How can convert vector aa size 1x262144 to matrix 256x256

조회 수: 3 (최근 30일)
nora elfiky
nora elfiky 2016년 12월 11일
댓글: honey 2020년 3월 16일
hi every one i'm new her i need help
size of aa 1x262144 i want convert to matrix 256x256
  댓글 수: 4
honey
honey 2020년 1월 6일
편집: honey 2020년 1월 6일
[y,fs]=audioread("filename");
disp(fs)
but the above didn't print the sampeled values
if there are anotherways for this plzz describe
along with these why we choose 1*262144 as size. is there any reason for it
Walter Roberson
Walter Roberson 2020년 1월 6일
In your posted code, fs would be the sampling frequency. The sampled values would be in y. You would proceed to fft(y) and then analyze the results along the lines I mentioned.
Note: your y might have multiple channels, which will show up as separate columns. Be careful, as in theory the different channels can have different peak frequencies.

댓글을 달려면 로그인하십시오.

채택된 답변

Isabella Osetinsky-Tzidaki
Isabella Osetinsky-Tzidaki 2016년 12월 11일
편집: Isabella Osetinsky-Tzidaki 2016년 12월 11일
% you will not convert (262144 is 4 times 256*256 and not equal to it)
% but complete 4 matrices out of your "aa" vector
% and you will get a "M" array:
L=256*256;
M=nan(256,256,4); % pre-allocate
for i=1:4
v=aa(L*(i-1)+1:L*i);
M(:,:,i)=reshape(v,256,256);
end
  댓글 수: 37
Walter Roberson
Walter Roberson 2020년 3월 16일
can u please explain in this code why is it necessary to use both DCT and DWT
You should be asking the author of the code questions like that.
why only HAAR in DWT
'haar' has good time localization, able to deal with sudden changes in value, which makes it more suitable for use in audio.
honey
honey 2020년 3월 16일
thank you

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

the cyclist
the cyclist 2016년 12월 11일
Use the reshape command.

카테고리

Help CenterFile Exchange에서 Image Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by