Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Português - Русский - 日本語
Aide de Scilab >> Lecture/Ecriture de fichiers binaires Matlab > loadmatfile

loadmatfile

loads a Matlab V6 MAT-file (binary or ASCII) into Scilab

Syntax

loadmatfile(format,filename[,var1[,var2[,...]]])
loadmatfile(filename[,format[,var1[,var2[,...]]]])
loadmatfile(filename[,var1[,var2,[,...[,format]]]])

Arguments

filename

character string containing the path of the file (needed)

format

file format (if not given and file has extension ".mat", file is considered to be binary)

"-mat"

binary file

"-ascii"

option to force Scilab to read file as an ASCII file

var1, var2

character strings containing the name of the variables to load (only for binary files)

Description

loads a Matlab MAT-file into Scilab. The Matlab data types are converted into the Scilab equivalents.

Examples

A = rand(10,10);
B = sprand(100,100,0.1);
savematfile('test_matfile.mat','A','B','-v6');
clear;
loadmatfile('test_matfile.mat');
disp(A)
disp(B)

See Also

  • load — Load a saved variable or a serie of variables
  • savematfile — write a Matlab MAT-file (binary or ASCII)
  • save — Save a variable or a serie of variables in a binary file
  • mfile2sci — Fonction de conversion de M-file Matlab vers Scilab
  • matfile2sci — convertit un fichier Matlab .mat en un fichier binaire Scilab

Bibliography

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

Comments

Author : Adrien Granger posted the 19/03/2013 10:41
I've got crashes using this function

I have a .mat file with several tables inside
I call loadmatfile('...mat') and Scilab just closes itself
I have the same thing occuring with matfile2sci function

Nothing is converted and Scilab closes

Could it be because my .mat file is to complicated ?
Reply to this comment
Please login to comment this page


Add a comment:
Please login to comment this page.

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

Scilab Enterprises
Copyright (c) 2011-2015 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jun 15 08:31:22 CEST 2016