| CS 1371 Dept. Presents: |
| MODIFIER METHOD | |
|---|---|
| Definition | The method called whenever Matlab wants to modify the contents of a class. |
| Example |
This modifies the balance account of BankAccount.
function setBalance(acct, amount)
acct.balance = amount;
assignin('caller',
inputname(1), acct);
Without this modifier, you cannot modify anything inside the BankAccount class. Consider a class a private file which cannot be modified without going through the proper channels, i.e a modifier
|