Converting Custom Class (.mat file) into MATLAB Structs
Mostra commenti meno recenti
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
Risposte (1)
per isakson
il 21 Ago 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.
Categorie
Scopri di più su Whos 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!