Folders Structure in OOP in matlab
Mostra commenti meno recenti
Hi,
I would like to ask you if it is possible to have a structure in matlab like the one below
mainpath/@fld1
mainpath/@fld1/fld1.m
mainpath/@fld1/@subfld11
mainpath/@fld1/@subfld11/subfld11.m
mainpath/@fld1/@subfld12/
mainpath/@fld1/@subfld12/subfld12.m
mainpath/@fld1/@subfld13/
mainpath/@fld1/@subfld13/subfld13.m
...
What I would like is to organize my code in such a way so that I could understand that subfld11 is part of fld1 (not subclass) and that fld1 (class) can use subfld11 methods/properties etc.
Thanks in advance
2 Commenti
Walter Roberson
il 10 Ott 2011
Hmmmm, maybe, but the '@' folder structure was the old style of OOP; you have more control with the newer style (which has been around since roughly 2009a I think it was.)
Simeon
il 11 Ott 2011
Risposta accettata
Più risposte (1)
Daniel Shub
il 10 Ott 2011
0 voti
You cannot do that. From the documentation ( http://www.mathworks.co.uk/help/techdoc/matlab_oop/brfynrp-1.html):
@-folders — Folder name begins with "@" and is not on the MATLAB path, but its parent folder is on the path.
So your second level of @ folders would not have parents who are on the path.
You might want to look into a package:
Categorie
Scopri di più su Simulink Coder in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!