Basically, I'm trying to construct a method that allows users to input a data file. It can be excel or ascii, and the method reads it as a matrix which can then be tested on.
Here is some of the rudimentary code I've modified from the tutorial:
classdef BankAccount < handle properties (Hidden) AccountStatus = 'open'; end properties (SetAccess = private) VEC AccountBalance = 0; end events InsufficientFunds end methods function BA = BankAccount(filename, InitialBalance) BA.VEC = xlsread(filename); BA.AccountBalance = InitialBalance;
then I try: BankAccount('sample.xlsx',55)
I'm getting an error: No public field VEC exists for class BankAccount.
Error in BankAccount (line 20) BA.VEC = xlsread(filename);
Best Answer