Ho to convert .mat to an vektor?

14 次查看(过去 30 天)
Beginner
Beginner 2018-6-18
A .mat file with 100 variables each has one value.
I Need a vector with this 100 values and in bestcase an arrey with the variables names.
Thanks

回答(1 个)

Ameer Hamza
Ameer Hamza 2018-6-18
编辑:Ameer Hamza 2018-6-18
Here is a solution
s = load('filename.mat');
this will create a single struct with variable name as filed names. To obtain a vector
Vector = struct2array(s);

标签

Community Treasure Hunt

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

Start Hunting!

Translated by