thank you. I have another little problem.
I want to print this array, but it gives a constant error.
n=3;
a=1;
for i=1:n
str =int2str(i);
file =strcat(str,'.wav')
%file = sprintf('%ss%d.wav', traindir, i);
%disp(file);
[s, fs] = wavread(file);
v = mfcc(s, fs); % Compute MFCC's
duz=v(:)';
for i=1:14554
h(a,i)=duz(1,i);
xlswrite('z',h);
end
a=a+1;
end

 채택된 답변

Jan
Jan 2019년 6월 5일
이동: Voss 2023년 12월 21일

0 개 추천

I've formatted your code today. Please do this by your own using the menu over the sectin for editing the message.
I've mentioned in another thread of you, that your code contains two loops with the same loop counter i. Please consider the given answers, otherwise it is a waste of time to help you.
Whenever you mention an error in the forum, post a copy of the complete error message also. This is more efficient than letting the readers guess, what the error is.
You overwrite the data in the Excel file in all itereations. The matrix h is growing iteratively. There are no comments which explain, what you want to achieve actually. I guess, the following solves the problem:
n = 3;
h = zeros(n, 14554);
for a = 1:n % i ==> a
file = sprintf('%d.wav', a);
[s, fs] = wavread(file);
v = mfcc(s, fs);
h(a, :) = v(1:14554);
end
xlswrite('z.xls', h);
Keep your code as simple as possible.

댓글 수: 1

tekin yorgun
tekin yorgun 2019년 6월 6일
이동: Voss 2023년 12월 21일
thank you my bro

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

태그

질문:

2019년 6월 5일

이동:

2023년 12월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by