필터 지우기
필터 지우기

how to load rest of data

조회 수: 1 (최근 30일)
andrew
andrew 2013년 7월 17일
I have the following code below:
filenames=cellstr(ls([Dir,'\*.mat*'])); %create a cell of all files in the directory named Dir containing the string '.mat' for j=1:length(filenames) % for loop to loop through each of the length(filenames) number of .mat files in Dir load(fullfile(Dir,filenames{j}),'percentiles'); %load the jth .mat file to the variable named percentiles. %The variable named 'percentiles' has 11 rows and two columns as described in the email filenames{j} percentiles; %print the contents of the variable named 'percentiles' end
There are a bunch of files but I cannot load all of the contents of 'percentiles' (only loads the last file of 'percentiles').
any suggestions?
  댓글 수: 1
Jan
Jan 2013년 7월 17일
Do you see that your code is not readable? Is this strange and do you want to ask the forum, how to improve the readability?

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

답변 (1개)

Iain
Iain 2013년 7월 17일
load(....,'percentiles')
stored_percentiles{j} = percentiles;

카테고리

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