I have a sequence of files that I want to process the data in one file with the same task. But when I import data to assign to a new array it failed:
'Error using importdata (line 136)
Unable to open file.
Error in freq (line 10)
mydata{k} = importdata(file_name{k})'.
I just want to work with one column of the file like in the picture. Thanks for your help!
clear all;source_dir = uigetdir([]); extension = '.csv'csvFiles = dir('*.csv'); num = length(csvFiles);file_name = cell(1,num);mydata = cell(1,num)for k=1:num; file_name{k} = fullfile(source_dir,['\SYSTEM',num2str(k),extension]); mydata{k} = importdata(file_name{k})end
Best Answer