Call a cdv file from a string

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

답변 (1개)

Sean de Wolski
Sean de Wolski 2014년 10월 6일

1 개 추천

c{3} = 'DM9999';
AQDATA([c{3} '.csv'])

댓글 수: 1

Perhaps with a comma is less unambiguous:
AQDATA([c{3},'.csv'])

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

태그

질문:

2014년 10월 6일

댓글:

2014년 10월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by