フィルターのクリア

not recognized as an internal or external command

44 ビュー (過去 30 日間)
Albert Rey Ruelan
Albert Rey Ruelan 2017 年 7 月 27 日
編集済み: Jan 2017 年 7 月 27 日
Help i am having trouble using this matlab command. I am trying to use the SVM train using matlab with this command
svmOutFile = [prefix '/svmOut.dat'];
command = ['!libsvm-2.88\windows\svm-train.exe -t 0 -c ' num2str(c) ' -v ' num2str(n) ' ' trainFile ' > ' svmOutFile];
eval(command);
where the error is 'libsvm-2.88\windows\svm-train.exe' is not recognized as an internal or external command, operable program or batch file.
What should i do?

採用された回答

Jan
Jan 2017 年 7 月 27 日
編集済み: Jan 2017 年 7 月 27 日
The error message seems to be clear.
Where do you expect the executable "libsvm-2.88\windows\svm-train.exe" to be? Relative to the current folder in the subfolder "libsvm-2.88\windows\"? Then prefer the absolute path name:
svmOutFile = fullfile(prefix, 'svmOut.dat');
exe = fullfile(cd, 'libsvm-2.88\windows\svm-train.exe');
command = [exe, ' -t 0 -c ', num2str(c), ' -v ', num2str(n), ' ', trainFile, ' > ', svmOutFile];
system(command)
I do not like eval.
Instead of relying on the current folder by using cd, better use absolute path names even to define the base folder.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeClassification についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by