Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *Variables* *Value* *Type*
- Time [100X1] double
- Force [100x1] double
- *Variables* *Value* *Type*
- Time_1 [90X1] double
- Force_1 [90x1] double
- %# get a listing of all save files
- fileList = dir('file*');
- nFiles = length(fileList);
- loadedData = cell(nFiles,2); %# for storing {force,time}
- %# loop through files and write results into loadedData
- for iFile = 1:nFiles
- tmp = load(fileList{iFile});
- loadedData(iFile,:) = struct2cell(tmp)';
- end
- %# catenate
- time = cat(1,loadedData(:,2));
- force = cat(1,loadedData(:,1));
- Time_1 = [1; 2];
- Time_2 = [2; 3];
- Time_3 = 4;
- All = [];
- for i = 1:3
- CurTime = eval(horzcat('Time_', num2str(i)));
- All = [All; CurTime];
- end
Add Comment
Please, Sign In to add comment