Input file names into a function inside a loop ?

조회 수: 6 (최근 30일)
Fatima Ramadan
Fatima Ramadan 2018년 11월 1일
답변: Walter Roberson 2018년 11월 1일
hello,
I am using a function that takes a filename as input and I trying to create a loop, whereby successive files of a certain folder are inputted to the function.
My code looks like this
info = dir('...');
names_cell = {info.name};
[acc, dt, np] = fn_readPEER_inputFile_old(names_cell(1));
I am getting an error that "Function is not defined for 'cell' inputs". any suggestions on how i can solve this ?
thanks!

채택된 답변

Walter Roberson
Walter Roberson 2018년 11월 1일
[acc, dt, np] = fn_readPEER_inputFile_old(names_cell{1});

추가 답변 (0개)

카테고리

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