MAT ファイルの読み取り (C/C++)
matdgns.c
の例では、ライブラリ ルーチンを使用した、MAT ファイルの読み取りおよび診断の方法を示します。コードを表示するには、MATLAB® エディターでファイルを開きます。
プログラムをビルドした後に、アプリケーションを実行します。このプログラムは、MAT ファイルの作成 (C/C++)の例で作成した mattest.mat
MAT ファイルを読み取ります。アプリケーションを実行するには、プラットフォームに応じて、そのアイコンをダブルクリックするか、システム プロンプトで「matdgns
」と入力します。
matdgns mattest.mat Reading file mattest.mat... Directory of mattest.mat: GlobalDouble LocalString LocalDouble Examining the header for each variable: According to its header, array GlobalDouble has 2 dimensions and was a global variable when saved According to its header, array LocalString has 2 dimensions and was a local variable when saved According to its header, array LocalDouble has 2 dimensions and was a local variable when saved Reading in the actual array contents: According to its contents, array GlobalDouble has 2 dimensions and was a global variable when saved According to its contents, array LocalString has 2 dimensions and was a local variable when saved According to its contents, array LocalDouble has 2 dimensions and was a local variable when saved Done