Saving to .mat without additional struct.
Show older comments
I have that structure
test =
struct with fields:
F0: 243000
I: [3×3 double]
I_1: [3×3 double]
I_X: 5550000
I_XZ: 33000
%[...]
m: 160000
that i want to save 'as it is'
uisave('test')
I save it as name ('test2'), i load it back and i go this
aircraftdata = load('test2.mat')
aircraftdata =
struct with fields:
test: [1×1 struct]
What i want is a structure like this :
aircraftdata =
struct with fields:
F0: 243000
I: [3×3 double]
I_1: [3×3 double]
I_X: 5550000
I_XZ: 33000
%[...]
m: 160000
The whole point is saving the structure untouched and load it with a new name
Accepted Answer
More Answers (2)
Steve Eddins
on 8 Jul 2022
Try this:
s = load("test2.mat");
aircraftdata = s.test;
Gabriel ROUX
on 8 Jul 2022
0 votes
Categories
Find more on Structures 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!