Main Content

Java データ型の変換

MATLAB への Java データの引き渡し

次の表は、MATLAB® エンジン API がどのように Java® データ型を MATLAB データ型にマッピングするかを示しています。

Java 型スカラー データの MATLAB 型配列データの MATLAB 型

boolean

logical

logical

bytes

int8

int8

short

int16

int16

int

int32

int32

long

int64

int64

float

single

single

double

double

double

char

char

char

java.lang.String

string

string

com.mathworks.matlab.types.Struct

struct

struct

com.mathworks.matlab.types.Complex

double

double

com.mathworks.matlab.types.HandleObject

MATLAB ハンドル オブジェクト

MATLAB ハンドル オブジェクト

com.mathworks.matlab.types.ValueObject

MATLAB 値オブジェクト

MATLAB 値オブジェクト

com.mathworks.matlab.types.CellStr

cellstr

cellstr

非矩形 (ジャグ) 配列

N/A

cell

Java への MATLAB データの引き渡し

次の表は、MATLAB エンジン API がどのように MATLAB データ型を Java データ型にマッピングするかを示しています。

MATLAB 型スカラー データの Java 型配列データの Java 型

logical

Boolean

boolean[]

int8

Byte

byte[]

uint8

Byte

byte[]

int16

Short

short[]

uint16

Short

short[]

int32

Integer

int[]

uint32

Integer

int[]

int64

Long

long[]

uint64

Long

long[]

single

Float

float[]

double

Double

double[]

char

String

String

string

String

String[]

cellstr

String

String[]

混合 cell 配列

N/A

Object[]

MATLAB ハンドル オブジェクト

com.mathworks.matlab.types.HandleObject

com.mathworks.matlab.types.HandleObject[]

MATLAB 値オブジェクト

com.mathworks.matlab.types.ValueObject

com.mathworks.matlab.types.ValueObject

複素数

com.mathworks.matlab.types.Complex

com.mathworks.matlab.types.Complex[]

struct

com.mathworks.matlab.types.Struct

com.mathworks.matlab.types.Struct[]

関連するトピック