Using User-defined class' object in another user-defined class.
1 view (last 30 days)
Show older comments
Hi, I am really new to matlab, and need help for this. Say I have defined a class Node. The name of the file is then Node.m. I have another class, Element, saved in file Element.m. How do I access the object of class Node in the file Element.m, or any other file for that matter?
0 Comments
Accepted Answer
Matt J
on 14 Oct 2012
There's no reason why you can't call Node's constructor inside Element.m as long as both Node.m and Element.m are visible to MATLAB, e.g., both are on the MATLAB path.
More Answers (0)
See Also
Categories
Find more on Software Development Tools in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!