Saving to .mat without additional struct.
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (2)
Steve Eddins
le 8 Juil 2022
Try this:
s = load("test2.mat");
aircraftdata = s.test;
Gabriel ROUX
le 8 Juil 2022
0 votes
Catégories
En savoir plus sur Structures dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!