フィルターのクリア

Help with "if else"?

4 ビュー (過去 30 日間)
Lianna Johnson
Lianna Johnson 2013 年 6 月 5 日
Hi, so I have the following files...
'20130529_SPLBRENT3_concat.mat'
'20130530_SPLBRENT3_concat.mat'
'20130531_SPLBRENT3_concat.mat'
'20130601_SPLBRENT3_concat.mat'
'20130602_SPLBRENT3_concat.mat'
'20130603_SPLBRENT3_concat.mat'
These are data files from the end of May (201305) and beginning of June (201306). I am trying to do an "if else" statement that will send the files with the first numbers 201305 to the path 'T:\10 - VEHICLE TESTING RESULTS\2011 KENWORTH ISX15\10 - CANAPE FILES\1305' and the files with the numbers 201306 to the path 'T:\10 - VEHICLE TESTING RESULTS\2011 KENWORTH ISX15\10 - CANAPE FILES\1306'. I'm pretty sure this is done with "if else" but I am not sure.
Can anyone help?
Thanks
  1 件のコメント
Jan
Jan 2013 年 6 月 5 日

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

回答 (1 件)

Image Analyst
Image Analyst 2013 年 6 月 5 日
Why not just use dir() to get a list of the files that are actually there? The faq http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F shows you how to process files that were returned from dir().
Otherwise I'd just sprintf to create the filenames, as the faq also shows you how to do.
  1 件のコメント
Lianna Johnson
Lianna Johnson 2013 年 6 月 5 日
This would work for files in a sequence that contain all numbers 1 to 20, but what if mine contain the numbers 1,2,4,11, etc? Not in order? Because I do not have data from every day. The data I showed above was just a chunk of the data I have

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by