Load variable as

1 Ansicht (letzte 30 Tage)
Graziano
Graziano am 1 Feb. 2011
Dear all, currently if I want to change the name of a variable stored in a .mat file I have first to load it and then change its name, once loaded in the workspace. This imply that if I already have a variable with the same name, maltlab overwrite it.
Question: is there a way to change the name on the fly while importing? I.e. a kind of load('test.mat','hi') as 'hello'.
Thank you

Antworten (1)

Paulo Silva
Paulo Silva am 1 Feb. 2011
hello=load('test.mat','hi')
hello.hi

Kategorien

Mehr zu Workspace Variables and MAT-Files finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by