How can I load a file whose name is stored in variable?

3 次查看(过去 30 天)
My file name is available in the cell(1,1) & Cell(1,1)= Temperature.txt. How can i load the file using the variable name stored in the cell? load(cell(1,1)) not working?

回答(1 个)

Image Analyst
Image Analyst 2017-12-20
Note that dir() returns a structure array, NOT a cell array. Also note the use of fullfile() inthe FAQ code. Also change the FAQ to use *.csv for the file pattern since that is what you want.

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by