Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.1 - Français

Change language to:
English - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Aide de Scilab >> Lecture/Ecriture de fichiers binaires Matlab > matfile_listvar

matfile_listvar

Lists variables of a Matlab binary MAT-file.

Syntax

[names[, classes[, types]]] = matfile_listvar(fd)

Arguments

fd

Real: file descriptor (returned by matfile_open).

names

String vector: names of the variables.

classes

Real vector: classes of the variables.

types

Real vector: data types of the variables.

Description

Lists variables of a Matlab binary MAT-file opened by matfile_open.

Returns empty matrices if the file contains no variables.

Examples

A = rand(10,10);
B = sprand(100,100,0.1);
C = "foo";
D = "bar";
savematfile('test_matfile.mat','A','B','C','D','-v6');
clear();
fd = matfile_open("test_matfile.mat");
[name, classes, types]=matfile_listvar(fd);
matfile_close(fd);

for i=1:size(name,"*") do
disp("The variable " + name(i) + " has type " + string(types(i)) + " and class " + string(classes(i)))
end

See also

Bibliography

This function uses MATIO library ( http://sourceforge.net/projects/matio/ ).

Report an issue
<< matfile_close Lecture/Ecriture de fichiers binaires Matlab matfile_open >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Feb 12 19:15:45 CET 2018