what is the function of 'eval' ?
古いコメントを表示
Hi Please explain what function is eval performing here and is it necessary to use it. I'm planning to use eval function to store code book, is there any alternative.
clc; Nsamp=35000; fs=8050; beep I=wavrecord(Nsamp,fs);
codebook = MFCC_BasedCodebook(I,fs); in=inputdlg('Enter file name -5 characters'); FileName=cell2mat(in); eval(['save ' 'test\' FileName ' codebook;']);
Thank you
1 件のコメント
"... is it necessary to use it."
It is not necessary to use it, its usage here marks this code as being extremely badly written.
"I'm planning to use eval function to store code book, is there any alternative."
save(fullfile('test',in{1}),'codebook')
Additionally: https://www.mathworks.com/help/matlab/ref/uiputfile.html
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Programming Utilities についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!