ヘルプ センターヘルプ センター
行列を文字列に変換
str = mat2str(A)
str = mat2str(A, n)
str = mat2str(A, 'class')
str = mat2str(A, n, 'class')
例
str = mat2str(A) は fi オブジェクト A を string 表現に変換します。この出力が関数 eval への入力に最適なのは、eval(str) が元の fi オブジェクトと完全に同じものを作成するためです。
str
A
fi
eval
eval(str)
str = mat2str(A, n) は、n ビットの精度を使用して fi オブジェクト A を string 表現に変換します。
n
str = mat2str(A, 'class') は、A のクラス名を含めて string 表現を作成します。このオプションは、str の評価結果がクラス情報も含むことを保証します。
str = mat2str(A, n, 'class') は、n ビットの精度を使用して、A のクラスを含めます。
すべて折りたたむ
fi オブジェクト a を string に変換します。
a
a = fi(pi); str = mat2str(a)
str = '3.1416015625'
fi オブジェクト a を 8 ビットの精度で string に変換します。
a = fi(pi); str = mat2str(a, 8)
str = '3.1416016'
入力配列。スカラー、ベクトルまたは行列として指定します。A は多次元配列にはできません。
データ型: fi|single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
single
double
int8
int16
int32
int64
uint8
uint16
uint32
uint64
出力の精度のビット数。正の整数として指定します。
データ型: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
入力配列の文字列表現。文字配列として返されます。
R2015b で導入
mat2str | tostring
mat2str
tostring
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office