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;
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!