リスト化するファイルの範囲指定

フォルダ826に 下記のように観測ファイルが並んでおり、
《フォルダ 826
82612.00 8/26 12:00
82612.01 8/26 12:01
82612.02 8/26 12:02
826123.59 8/26 23:59
下記のプログラムで変数D に8/26 12:00-12:59 の観測ファイルをリスト化出来るのですが、
変数Dに8/26 12:00-13:59 の観測ファイルをリスト化するためにはどのような表記方法があるでしょうか。
%ファイル名をフルパスごと取得
DebugFiles = 'C:\Users\Documents\MATLAB\826\*1682612*';
%指定フォルダ内のファイルをリスト化
D = dir(DebugFiles);

 Accepted Answer

Jiro Doke
Jiro Doke on 7 Dec 2017

2 votes

8/26 12:00-12:59 の観測ファイルをリスト化できているのでしたら、それに8/26 13:00-13:59 の観測ファイルを追加すればよいのではないでしょうか。
%ファイル名をフルパスごと取得 (8/26 12:00-12:59)
DebugFiles = 'C:\Users\Documents\MATLAB\826\*1682612*';
%指定フォルダ内のファイルをリスト化
D = dir(DebugFiles);
%ファイル名をフルパスごと取得 (8/26 13:00-13:59)
DebugFiles2 = 'C:\Users\Documents\MATLAB\826\*1682613*';
%指定フォルダ内のファイルをリスト化
D2 = dir(DebugFiles2);
%二つのリストの連結
D3 = [D; D2]

1 Comment

nknknknk
nknknknk on 15 Dec 2017
リストの連結方法を知りませんでした。 ありがとうございます。

Sign in to comment.

More Answers (0)

Categories

Find more on 行列および配列 in Help Center and File Exchange

Asked:

on 7 Dec 2017

Commented:

on 15 Dec 2017

Community Treasure Hunt

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

Start Hunting!