Converting Custom Class (.mat file) into MATLAB Structs
Show older comments
Hello Everyone,
I am really stuck in one project in which I have to utilize a .mat file for my project but unfortunately I am stuck at one point.
The problem is that, i wrote a .mat file using custom class and now i want to convert it into MATLAB struct form so that i can easily avail it any time and any place. because whenever i want to open it, it asks for the classdef file with it. I want to convert it into simple Matlab struct file.
When i run the whos command it shows class as Mono_Data, which is user defined class, what i really want is to convert this Mono_Data into MATLAB structure class.
Please tell me a solution for this problem, I will be very thankful to you.
Thanks
Answers (1)
per isakson
on 21 Aug 2013
You can "convert" an instance of the class to a structure
md = Mono_Data( ... );
sa = struct( md );
however sa will only contain the properties, not the methods.
"easily avail it any time and any place" is not possible the way you want.
Categories
Find more on Whos 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!