I'm trying to design a class whose instance is an array of matrices. The matrices are read from some source file, xls, csv, etc. The super matrix is of size 30, and the user can add files in each slot. The declaration needs to allow for dynamic possibilities. But I'm not sure how to do this syntactically. I'm running MATLAB R2012B.
Here is the code thus far:
classdef BankAccount < handle properties (Hidden) end
properties (SetAccess = private) VEC IndicatorCount = 0; Index = zeros(30); %This obviously won't work because of a dimension mismatch
end methods function BA = BankAccount(filename) if nargin ~=0 %handles empty declarations
BA.VEC = xlsread(filename); BA.IndicatorCount = FI.IndicatorCount +1; %find shorthand
disp(FI.IndicatorCount) BA.Index(FI.IndicatorCount)= FI.VEC; %need the Index to be able to take on %different matrix sizes dynamically
end end endend
if someone can tell me how to do this in a smart way I would appreciate the help
Best Answer