@ folders - what is it?
Show older comments
Hi,
I am looking for information about the @ - directories, I've found only: http://www.mathworks.com/help/techdoc/matlab_oop/brfynrp- 1.html#brfynrp-2
So I have question:
Why do you need these folders?
Only for organizing classes?
Or is there any other application?
Accepted Answer
More Answers (1)
Jan
on 9 Sep 2011
The @-folders can be used to call a specific function depending on the class of the input. E.g. you can create two functions with the same name, but in different @-folders:
D:\MFiles\@double\show.m
D:\MFiles\@cell\show.m
Now show(8) calls @double/show, while show({8}) calls @cell/show. This is equivalent to the usage with objects.
Note, that only 'D:\MFiles' is included in the MATLAB path in this case, and not the @-folders.
Categories
Find more on Performance and Memory in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!