[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Can someone test this for me in MATLAB?
From: |
Michael Goffioul |
Subject: |
Can someone test this for me in MATLAB? |
Date: |
Thu, 3 Jan 2013 20:05:11 -0500 |
Hi,
Could someone test something I'm wondering about classdef reload in MATLAB. Let's say there's a class defined as:
classdef ClassA < handle
properties
p1 = 0;
end
end
At the prompt, create an object of ClassA:
x = ClassA()
Then, without closing MATLAB, edit the classdef file and a second property, the class now looks like this:
classdef ClassA < handle
properties
p1 = 0;
p2 = 1;
end
end
At the prompt, create a second object of ClassA:
y = ClassA()
The question is: what are the properties of x and y?
A similar question occurs for methods. If the initial definition of ClassA contains a method m1. After creation of x, a second method m2 is added and another object is created. Is method m2 valid for object x? That is, does this succeeds (assuming m2 does not take any argument):
x.m2()
Michael.
- Can someone test this for me in MATLAB?,
Michael Goffioul <=
- Re: Can someone test this for me in MATLAB?, Ben Abbott, 2013/01/03
- Re: Can someone test this for me in MATLAB?, Ben Abbott, 2013/01/03
- Re: Can someone test this for me in MATLAB?, Michael Goffioul, 2013/01/03
- Re: Can someone test this for me in MATLAB?, Michael Goffioul, 2013/01/03
- Re: Can someone test this for me in MATLAB?, Ben Abbott, 2013/01/04
- Re: Can someone test this for me in MATLAB?, Michael Goffioul, 2013/01/04
- Re: Can someone test this for me in MATLAB?, Michael D. Godfrey, 2013/01/04
- Re: Can someone test this for me in MATLAB?, Michael Goffioul, 2013/01/04
- Re: Can someone test this for me in MATLAB?, Michael D. Godfrey, 2013/01/04
- Re: Can someone test this for me in MATLAB?, Michael Goffioul, 2013/01/04