[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can someone test this for me in MATLAB?
From: |
Michael D. Godfrey |
Subject: |
Re: Can someone test this for me in MATLAB? |
Date: |
Fri, 04 Jan 2013 11:31:40 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
On 01/04/2013 10:33 AM, Michael Goffioul wrote:
Can anyone else help here?
I'd also like to know what happens when the class definition file
changes due to path change:
1) have a class definition in the path; create an object of that
class; change path such that the class definition file is not
accessible anymore; is the object still valid? is it possible to
create more objects of the class?
2) a variant of 1) is to have a superclass disappearing from the path,
while the subclass is still available
3) a variant of 1) is when another class definition with the same name
appears in the path: let's say you have 2 different class definitions
d1/ClassA.m and d2/ClassA.m (with different methods and/or
properties), then "addpath d1; x = ClassA(); rmpath d1; addpath d2; y
= ClassA();";
4) a variant of 3) is to have a different superclass due to path
change, while the subclass stays the same: you have ClassB.m,
d1/ClassA.m and d2/ClassA.m, with ClassB inheriting from ClassA; then
"addpath d1; x = ClassB(); rmpath d1; addpath d2; y = ClassB();"
5) a variant of 4) is without creating objects, simply accessing the
metaclass with "?ClassB"
Michael.
I created the file:
[qss:octave_test] more test_class_p.m
classdef ClassC < handle
properties
p1 = 0;
p2 = 1;
end
end
in the Matlab path and got:
>> ?ClassC
ans =
0x0 empty meta.class handle
Package: meta
Properties:
Name
Description
DetailedDescription
Hidden
Sealed
ConstructOnLoad
InferiorClasses
Properties
Methods
Events
SuperClasses
ContainingPackage
>> y=ClassC()
??? Undefined function or variable 'ClassC'.
>>
Should the definition have been in a @-folder?
I need pretty explicit description of what is needed since I have
not used Matlab Class stuff.
MG
- 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/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 <=
- Re: Can someone test this for me in MATLAB?, Michael Goffioul, 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
- 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 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