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 ExchangeData 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