I am unable to understand the code

1 回表示 (過去 30 日間)
Reuben Addison
Reuben Addison 2019 年 1 月 11 日
コメント済み: Reuben Addison 2019 年 1 月 11 日
I am new to Matlab and I have taken an introductory course in it, I am currently reading someone's code to recreate mine, can someone kindly help explain line 7 of the code below.
  1. direc = dir(['C:\Documents and Settings\All Users\Documents\NeuroScript\PAN\107\Digitizer_trials\*.HWR']);
  2. filenames = {direc.name};
  3. filename = filenames{trialnumber};
  4. [pathstr, name, ext] = fileparts(filename);
  5. names = strrep(name,'10704101F','');
  6. names = str2num(names);
  7. data = dlmread(['C:\Documents and Settings\All Users\Documents\NeuroScript\PAN\107\Digitizer_trials\' cell2mat(filenames(trialnumber))],'',1,0);
  2 件のコメント
Adam
Adam 2019 年 1 月 11 日
The documentation in Matlab is excellent. In addition to Greg's answer just try:
doc dir
doc fileparts
doc strrep
doc str2num
and then see what you still don't understand.
Reuben Addison
Reuben Addison 2019 年 1 月 11 日
I was able to follw till the last part of the code '',1,0);

サインインしてコメントする。

採用された回答

Reuben Addison
Reuben Addison 2019 年 1 月 11 日
Thanks

その他の回答 (1 件)

Greg Heath
Greg Heath 2019 年 1 月 11 日
See
help dlmread
doc dlmread
Thank you for formally accepting my answer
Greg

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by