外部インタフェース/API    

MATLABからのCおよびFortranプログラムの呼び出し

MEX-ファイルの紹介

MEX-ファイルの使用法

接頭語mxとmexの区別

MATLABデータ

MATLAB配列

データストレージ

MATLABのデータタイプ

データタイプの使用法

MEX-ファイルの作成

コンパイラの必要条件

UNIXでの設定のテスト

Windowsでの設定のテスト

オプションファイルの指定

MEX-ファイルの作成のカスタマイズ

この章の対象ユーザ

MEXスクリプトスイッチ

UNIXでのデフォルトオプションファイル

Windowsでのデフォルトオプションファイル

UNIXでの作成のカスタマイズ

Windowsでの作成のカスタマイズ

トラブルシューティング

設定の問題

MEX-ファイルの問題の理解

コンパイラとプラットフォーム固有の問題

メモリ管理の互換性の問題

その他の情報

ファイルとディレクトリ - UNIXシステム

ファイルとディレクトリ - Windowsシステム

例題

テクニカルサポート

C言語MEX-ファイルの作成

C MEX-ファイル

C MEX-ファイルの部分

MEX-ファイルに必要な引数

C MEX-ファイルの例

第一の例 -- スカラを渡す

文字列を渡す

複数の入出力を渡す

構造体およびセル配列を渡す

複素データの操作

8、16、32ビットデータの取り扱い

多次元数値配列の操作

スパース配列の取り扱い

C MEX-ファイルからの関数の呼び出し

アドバンスドトピックス

ヘルプファイル

複数ファイルのリンク

MEX-ファイル関数のワークスペース

メモリ管理

LAPACKおよびBLAS関数の使用法

C言語MEX-ファイルのデバッグ方法

UNIXでのデバッグ

Windowsでのデバッグ

Fortran MEX-ファイルの作成

Fortran MEX-ファイル

Fortran MEX-ファイルの部分

%valコンストラクト

Fortran MEX-ファイルの例

第一の例 -- スカラを渡す

文字列を渡す

文字列の配列を渡す

行列を渡す

複数の入出力を渡す

複素データの取り扱い

ダイナミックなメモリの割り当て

スパース行列の取り扱い

Fortran MEX-ファイルからの関数の呼び出し

アドバンスドトピックス

ヘルプファイル

複数ファイルのリンク

MEX-ファイル関数のワークスペース

メモリ管理

Fortran言語MEX-ファイルのデバッグ方法

UNIXでのデバッグ

Windowsでのデバッグ

CおよびFortranプログラムからの関数の呼び出し

MATLABエンジンの使用法

エンジンライブラリ

GUIインテンシブなアプリケーション

エンジン関数の呼び出しの例題

CアプリケーションからのMATLABの呼び出し

FortranアプリケーションからのMATLABの呼び出し

オープンされているMATLABの利用

エンジンプログラムのコンパイルとリンク

浮動小数点の例外のマスク

UNIXでのコンパイルとリンク

Windowsでのコンパイルとリンク

MATLABからのJavaの呼び出し

Using Java from MATLAB: An Overview

Java Interface Is Integral to MATLAB

Benefits of the MATLAB Java Interface

Who Should Use the MATLAB Java Interface

To Learn More About Java Programming

Platform Support for the Java Virtual Machine

Bringing Java Classes into MATLAB

Sources of Java Classes

Defining New Java Classes

Making Java Classes Available to MATLAB

Loading Java Class Definitions

Simplifying Java Class Names

Creating and Using Java Objects

Constructing Java Objects

Concatenating Java Objects

Saving and Loading Java Objects to MAT-Files

Finding the Public Data Fields of an Object

Accessing Private and Public Data

Determining the Class of an Object

Invoking Methods on Java Objects

Using Java and MATLAB Calling Syntax

Invoking Static Methods on Java Classes

Obtaining Information About Methods

Java Methods that Affect MATLAB Commands

How MATLAB Handles Undefined Methods

How MATLAB Handles Java Exceptions

Working with Java Arrays

How MATLAB Represents the Java Array

Creating an Array of Objects within MATLAB

Accessing Elements of a Java Array

Assigning to a Java Array

Concatenating Java Arrays

Creating a New Array Reference

Creating a Copy of a Java Array

Passing Data to a Java Method

Conversion of MATLAB Argument Data

Passing Built-In Data Types

Passing String Arguments

Passing Java Objects

Other Data Conversion Topics

Passing Data to Overloaded Methods

Handling Data Returned from a Java Method

Conversion of Java Return Data

Built-In Data Types

Java Objects

Converting Objects to MATLAB Data Types

Introduction to Programming Examples

Example - Reading a URL

Description of URLdemo

Running the Example

Example - Finding an Internet Protocol Address

Description of resolveip

Running the Example

Example - Communicating Through a Serial Port

Description of Serial Example

Running the serialexample Program

Example - Creating and Using a Phone Book

Description of Function phonebook

Description of Function pb_lookup

Description of Function pb_add

Description of Function pb_remove

Description of Function pb_change

Description of Function pb_listall

Description of Function pb_display

Description of Function pb_keyfilter

Running the phonebook Program

Importing and Exporting Data

Using MAT-Files

Importing Data to MATLAB

Exporting Data from MATLAB

Exchanging Data Files Between Platforms

Reading and Writing MAT-Files

Finding Associated Files

Examples of MAT-Files

Creating a MAT-File in C

Reading a MAT-File in C

Creating a MAT-File in Fortran

Reading a MAT-File in Fortran

Compiling and Linking MAT-File Programs

Masking Floating Point Exceptions

Compiling and Linking on UNIX

Compiling and Linking on Windows

ActiveX and DDE Support

Introducing MATLAB ActiveX Integration

ActiveX Concepts and Terminology

MATLAB ActiveX Support Overview

MATLAB ActiveX Client Support

Using ActiveX Objects

ActiveX Client Reference

actxcontrol

actxserver

delete

get

invoke

load

move

propedit

release

save

send

set

Writing Event Handlers

Additional ActiveX Client Information

Releasing Interfaces

Using ActiveX Collections

Converting Data

Using MATLAB As a DCOM Server Client

MATLAB ActiveX Support Limitations

MATLAB Sample Control

Using MATLAB As an Automation Client

MATLAB ActiveX Automation Server Support

MATLAB ActiveX Automation Methods

Additional ActiveX Server Information

Launching the MATLAB ActiveX Server

Specifying a Shared or Dedicated Server

Using MATLAB As a DCOM Server

Dynamic Data Exchange (DDE)

DDE Concepts and Terminology

Accessing MATLAB As a Server

The DDE Name Hierarchy

Example: Using Visual Basic and the MATLAB DDE Server

Using MATLAB As a Client

DDE Advisory Links


Serial Port I/O

Introduction

What Is MATLAB's Serial Port Interface?

Supported Serial Port Interface Standards

Supported Platforms

Using the Examples with Your Device

Overview of the Serial Port

What Is Serial Communication?

The Serial Port Interface Standard

Connecting Two Devices with a Serial Cable

Serial Port Signals and Pin Assignments

Serial Data Format

Finding Serial Port Information for Your Platform

Selected Bibliography

Getting Started with Serial I/O

Example: Getting Started

The Serial Port Session

Configuring and Returning Properties

Creating a Serial Port Object

Configuring Properties During Object Creation

The Serial Port Object Display

Creating an Array of Serial Port Objects

Connecting to the Device

Configuring Communication Settings

Writing and Reading Data

Example: Introduction to Writing and Reading Data

Controlling Access to the MATLAB Command Line

Writing Data

Reading Data

Example: Writing and Reading Text Data

Example: Parsing Input Data Using strread

Example: Reading Binary Data

Using Events and Actions

Example: Introduction to Events and Actions

Event Types and Action Properties

Storing Event Information

Creating and Executing Action Functions

Enabling Action Functions After They Error

Example: Using Events and Actions

Using Control Pins

Signaling the Presence of Connected Devices

Controlling the Flow of Data: Handshaking

Debugging: Recording Information to Disk

Example: Introduction to Recording Information

Creating Multiple Record Files

Specifying a Filename

The Record File Format

Example: Recording Information to Disk

Saving and Loading

Using Serial Port Objects on Different Platforms

Disconnecting and Cleaning Up

Disconnecting a Serial Port Object

Cleaning Up the MATLAB Environment

Property Reference

The Property Reference Page Format

Serial Port Object Properties

BaudRate

BreakInterruptAction

ByteOrder

BytesAvailable

BytesAvailableAction

BytesAvailableActionCount

BytesAvailableActionMode

BytesToOutput

DataBits

DataTerminalReady

ErrorAction

FlowControl

InputBufferSize

Name

OutputBufferSize

OutputEmptyAction

Parity

PinStatus

PinStatusAction

Port

ReadAsyncMode

RecordDetail

RecordMode

RecordName

RecordStatus

RequestToSend

Status

StopBits

Tag

Terminator

Timeout

TimerAction

TimerPeriod

TransferStatus

Type

UserData

ValuesReceived

ValuesSent


 External Interfaces/API Calling C and Fortran Programs from MATLAB