I am unable to understand the code

조회 수: 2 (최근 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 CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by