Object Data get lost between save and load
3 views (last 30 days)
Show older comments
I want to save an object in a *.mat file and load it at a later point. Before I save it there is data in the object data property, when I load it there is no data in it. If I run this code
info1 = 'these are the properties that will be saved'
tmtable = app.FlightMatrixTable % to be saved
save('FMtestmatrix.mat','tmtable'); % saving it according to MATLAB Syntax
load('FMtestmatrix.mat'); % loading it without anything modified on tmtable between save and load
info2 = 'this is how it comes out of the mat file'
tmtable
this is the output shown in my command window:
info1 =
'these are the properties that will be saved'
tmtable =
Table with properties:
Data: [8×8 table]
ColumnWidth: 'auto'
ColumnEditable: []
CellEditCallback: ''
Position: [18 51 669 429]
Units: 'pixels'
Show all properties
info2 =
'this is how it comes out of the mat file'
tmtable =
Table with properties:
Data: []
ColumnWidth: 'auto'
ColumnEditable: []
CellEditCallback: ''
Position: [18 51 669 429]
Units: 'pixels'
Show all properties
As you can see the Data property contains an 8x8 table before saving and is empty after loading. What happened inbetween saving and loading? Thank you very much for your help!
0 Comments
Answers (2)
Prabhan Purwar
on 23 Apr 2020
Hi,
Could you please provide the app.FlightMatrixTable object so that we can replicate the issue.
Kindly refer to the following code:
info1 = 'these are the properties that will be saved'
pcobj=pointCloud([0 0 0])
save('FMtestmatrix.mat','pcobj'); % saving it according to MATLAB Syntax
load('FMtestmatrix.mat'); % loading it without anything modified on pcobj between save and load
info2 = 'this is how it comes out of the mat file'
pcobj
Output (as expected):
Thanks
0 Comments
See Also
Categories
Find more on Environment and Settings 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!