creating an input list from a large data set

2 次查看(过去 30 天)
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
why don't you simply write
clear dir;
list = dir('c:\Lisajustin\vib\*.csv');

更多回答(2 个)

Sachin Ganjare
Sachin Ganjare 2012-10-18

Azzi Abdelmalek
Azzi Abdelmalek 2012-10-18
folder='C:\Lisajustin\vib\'
list=struct2cell(dir([folder '*.csv']));
Listdir=list(1,:)

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by