Subsref error (Index exceeds matrix dimensions)
Show older comments
function [VarNames] = TimeAlignMatFile(InputFilename,DeltaTime) % option to evaluate variables across longest time range recorded use_full_time_range = 1;
DataStructure = load(InputFilename);
Names = fieldnames(DataStructure);
NoNames = length(Names);
VarNames = (Names(2:NoNames)); % Names(1) is always 'header', so ignore
% Create individual structure for first variable in the MAT file
Part.type = '()';
Part.subs = Names(2);
TempStructure = subsref(DataStructure, Part);
time = TempStructure.time;
Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!