Subsref error (Index exceeds matrix dimensions)

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)

Products

Asked:

on 19 Jan 2018

Community Treasure Hunt

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

Start Hunting!