hi,i am using a gui to browse for a file and that file has to be given as an input to the script.i tried hard but its showing erroe.what to do?

回答 (1 件)

Jan
Jan 2017 年 5 月 16 日
編集済み: Jan 2017 年 5 月 16 日

0 投票

  1. Post your code. Otherwise the readers can not reconsider, what you are trying.
  2. Post the complete error message, because it is required to understand, what's goind wrong.
  3. Explain peroperly, what youwant to achieve. Scripts do not get inputs, only functions do.
A bold guess based on the lean description of the problem:
function ChooseAFile
[fName, fPath] = uigetfile('*.txt', 'Select a file');
if ~ischar(fName)
disp('User aborted file choosing.')
return;
end
File = fullfile(fPath, fName);
YourFunction(File);

カテゴリ

ヘルプ センター および File Exchange で Language Support についてさらに検索

質問済み:

2017 年 5 月 16 日

編集済み:

Jan
2017 年 5 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by