creating an input list from a large data set

Hi! I want to create an input list from a large data set. dir .*csv displays all the csv but when i do
dir='C:\Lisajustin\vib'
Listdir=sprintf('%s%s',dir, ' *.csv');
i get error
Error using ==> sprintf
Function is not defined for 'struct' inputs.

 採用された回答

RNTL
RNTL 2012 年 10 月 24 日

0 投票

why don't you simply write
clear dir;
list = dir('c:\Lisajustin\vib\*.csv');

その他の回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2012 年 10 月 18 日

0 投票

folder='C:\Lisajustin\vib\'
list=struct2cell(dir([folder '*.csv']));
Listdir=list(1,:)

2 件のコメント

Lisa Justin
Lisa Justin 2012 年 10 月 19 日
編集済み: Lisa Justin 2012 年 10 月 19 日
It is giving error still
Azzi Abdelmalek
Azzi Abdelmalek 2012 年 10 月 24 日
what kind of error?

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

カテゴリ

ヘルプ センター および File ExchangeFile Operations についてさらに検索

タグ

質問済み:

2012 年 10 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by