Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.0 - 日本語

Change language to:
English - Français - Português - Русский

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

Scilabヘルプ >> Matlab binary files I/O > matfile_varreadnext

matfile_varreadnext

Matlab バイナリ MATファイルの次の変数を読み込む.

呼び出し手順

[name[, value[, vartype]]] = matfile_varreadnext(fd)

引数

fd

実数: (matfile_openにより返された)ファイル記述子.

name

文字列: 読み込んだ変数の名前または "" (読み込みに失敗した場合).

value

任意のScilab型: 読み込んだ変数の値または空の行列(読み込みに失敗した場合).

vartype

実数: 変数の型(読み込みに成功した場合)または:

  • 0: 変数の型が不明の場合.

  • -1: ファイル終端に達した場合.

説明

matfile_openにより開かれた Matlabバイナリ MATファイルの次の変数を読み込みます.

A = rand(10,10);
B = sprand(10,10,0.1);
C = "foo";
D = "bar";
savematfile('test_matfile.mat','A','B','C','D','-v6');
clear();
fd = matfile_open("test_matfile.mat");
//-- 保存された変数についてループ処理
while %t
   [Name, Value, Type] = matfile_varreadnext(fd);
   if Name == "" then
      break;
   else
      disp("The variable " + Name + " has type " + string(Type) + " and contains:");
      disp(Value);
   end
end
matfile_close(fd);

参照

  • matfile_open — Matlab バイナリ MAT-ファイルを開く.
  • matfile_close — Matlab バイナリ MATファイルを閉じる.
  • matfile_varwrite — Matlab バイナリ MATファイルに変数を書き込む.
  • matfile_listvar — Matlab バイナリ MATファイルの中の変数の一覧を得る.

参考文献

この関数はMATIOライブラリ ( http://sourceforge.net/projects/matio/ )を使用しています.

Report an issue
<< matfile_open Matlab binary files I/O matfile_varwrite >>

Copyright (c) 2022-2023 (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:
Tue Feb 14 15:10:43 CET 2017