Call a cdv file from a string

2 views (last 30 days)
Simone
Simone on 6 Oct 2014
Commented: Stephen23 on 6 Oct 2014
Hello, I have some codes in a cell array and a csv file for every code that contain some data. I would like to read avery code in the cell array and pass the the corresponding file to a function that i wrote. For example in the third cell the code is DM999999 I want to run AQDATA('DM999999.csv'). How can I implement this in a for loop?
Thank you

Answers (1)

Sean de Wolski
Sean de Wolski on 6 Oct 2014
c{3} = 'DM9999';
AQDATA([c{3} '.csv'])
  1 Comment
Stephen23
Stephen23 on 6 Oct 2014
Perhaps with a comma is less unambiguous:
AQDATA([c{3},'.csv'])

Sign in to comment.

Categories

Find more on Large Files and Big Data in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!