MATLAB Answers

0

creating an input list from a large data set

Asked by Lisa Justin on 18 Oct 2012

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.

  0 Comments

Products

No products are associated with this question.

3 Answers

Answer by RNTL
on 24 Oct 2012
 Accepted answer

why don't you simply write

clear dir;
list = dir('c:\Lisajustin\vib\*.csv');

  0 Comments


Answer by PG
on 18 Oct 2012

Refer link below:

http://www.mathworks.com/matlabcentral/answers/21801

Hope it helps!!!

  0 Comments


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

  2 Comments

Lisa Justin on 19 Oct 2012

It is giving error still

Azzi Abdelmalek
on 24 Oct 2012

what kind of error?


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!