没有合适的资源?快使用搜索试试~ 我知道了~
首页MATLAB的C++ 数学库使用手册
MATLAB的C++ 数学库使用手册
4星 · 超过85%的资源 需积分: 10 63 下载量 118 浏览量
更新于2023-03-03
评论
收藏 2.49MB PDF 举报
The MATLAB® C++ Math Library serves two separate constituencies:<br>MATLAB programmers seeking more speed or complete independence from<br>interpreted MATLAB, and C++ programmers who need a fast, easy-to-use<br>matrix math library. To each, it offers distinct advantages.
资源详情
资源评论
资源推荐
The Language of Technical Computing
Computation
Visualization
Programming
MATLAB
®
C++
Math Library
User’s Guide
Version 2.1
How to Contact The MathWorks:
508-647-7000 Phone
508-647-7001 Fax
The MathWorks, Inc. Mail
3AppleHillDrive
Natick, MA 01760-2098
http://www.mathworks.com Web
ftp.mathworks.com Anonymous FTP server
comp.soft-sys.matlab Newsgroup
support@mathworks.com Technical support
suggest@mathworks.com Product enhancement suggestions
bugs@mathworks.com Bug reports
doc@mathworks.com Documentation error reports
subscribe@mathworks.com Subscribing user registration
service@mathworks.com Order status, license renewals, passcodes
info@mathworks.com Sales, pricing, and general information
MATLAB C++ Math Library User’s Guide
COPYRIGHT 1984 - 2000 by The MathWorks, Inc.
The software described inthisdocument is furnished under a license agreement. The software may be used
or copied only under the terms of the license agreement. No part of this manual may be photocopied or repro-
duced in any form without prior written consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by
or for the federal government of the United States. By accepting delivery of the Program, the government
hereby agrees that this software qualifies as "commercial" computer software within the meaning of FAR
Part12.212,DFARS Part227.7202-1,DFARS Part227.7202-3, DFARS Part252.227-7013, and DFARSPart
252.227-7014. The terms and conditionsof The MathWorks, Inc. Software License Agreement shall pertain
to the government’s use and disclosure of the Program and Documentation, and shall supersede any
conflicting contractual terms or conditions. If this license fails to meet the government’s minimum needs or
is inconsistent in any respect with federal procurement law, the government agrees to return the Program
and Documentation, unused, to MathWorks.
MATLAB, Simulink, Stateflow, Handle Graphics, and Real-Time Workshop are registered trademarks, and
Target Language Compiler is a trademark of The MathWorks, Inc.
Other product or brand names are trademarks or registered trademarks of their respective holders.
Printing History: October 1995 First printing
January 1998 Revised for Version 1.2
January 1999 Revised for Version 2.0 (Release 11)
September 2000 Revised for Version 2.1 (Release 12) Online only
i
Contents
1
Getting Started
Introduction ......................................... 1-2
OverviewoftheMATLABC++MathLibrary.............. 1-2
WhoShouldReadThisBook............................ 1-4
NewMATLABC++MathLibraryFeatures ............... 1-5
MATLABC++MathLibraryDocumentation .............. 1-5
GettingStartedQuickly ............................... 1-8
Installing the C++ Math Library ........................ 1-9
Installation with MATLAB . . . . . . . . . . . .................. 1-9
Installation Without MATLAB . . . . . . . . ................. 1-10
VerifyingaUNIXInstallation ......................... 1-10
Verifying a PC Installation . . . . . . . . . . . ................. 1-10
Installing Your C++ Compiler . . . . . . . . ................. 1-11
Building C++ Applications ............................ 1-13
Overview .......................................... 1-13
Building a Stand-Alone Application on UNIX .......... 1-15
ConfiguringtheBuildEnvironment .................... 1-15
BuildinganApplication .............................. 1-18
mbuildOptions ..................................... 1-20
Building a Stand-Alone Application on PCs ............ 1-23
ConfiguringtheBuildEnvironment .................... 1-23
BuildinganApplication .............................. 1-29
mbuildOptions ..................................... 1-30
Troubleshooting mbuild .............................. 1-33
Linking Applications Without mbuild ................. 1-35
Distributing Stand-Alone Applications ................ 1-36
Packaging the MATLAB Math Run-Time Libraries . . . . . . . . 1-36
ii Contents
Installing Your Application . ........................... 1-37
ProblemStartingStand-AloneApplication ............... 1-38
2
Fundamentals
MATLAB Basics ....................................... 2-3
DataTypes .......................................... 2-3
Operators ........................................... 2-4
Functions ........................................... 2-6
InputandOutput..................................... 2-6
Errors .............................................. 2-7
FlowofControl....................................... 2-7
MATLAB for C++ Programmers ......................... 2-8
C++ for MATLAB Users ............................... 2-10
HowtheLibraryIsSimilartoMATLAB ................. 2-10
HowC++andtheLibraryDifferfromMATLAB ........... 2-10
MATLAB C++ Math Library Basics ..................... 2-12
DataTypes ......................................... 2-12
Operators .......................................... 2-13
Functions .......................................... 2-14
InputandOutput.................................... 2-15
Errors ............................................. 2-16
MemoryManagement ................................ 2-16
Stand-Alone Programs ................................ 2-18
Example Program: Writing Simple Functions (ex4.cpp) . . . . . 2-19
WritingEfficientPrograms ............................ 2-22
Learning More ....................................... 2-24
iii
3
Working with MATLAB Arrays
Overview ............................................. 3-2
SupportedMATLABArrayTypes........................ 3-2
MATLABArrayC++Object ............................ 3-3
Numeric Arrays ....................................... 3-4
CreatingNumericArrays .............................. 3-5
InitializingaNumericArraywithData.................. 3-13
Example Program: Creating Arrays and Array I/O (ex1.cpp) . 3-15
Sparse Matrices ...................................... 3-19
CreatingaSparseMatrix ............................. 3-20
Converting a Sparse Matrix to Full Matrix Format . . . . . . . . 3-23
EvaluatingArraysforSparseStorage ................... 3-23
Character Arrays .................................... 3-24
CreatingMATLABCharacterArrays.................... 3-25
Cell Arrays .......................................... 3-28
CreatingCellArrays ................................. 3-28
DisplayingtheContentsofaCellArray.................. 3-33
MATLAB Structures .................................. 3-35
CreatingStructures .................................. 3-35
Performing Common Array Programming Tasks ........ 3-39
ConvertingDatatoMATLABArrays .................... 3-39
DeterminingArraySize............................... 3-42
4
Indexing into Arrays
Overview ............................................. 4-2
Terminology ......................................... 4-2
DimensionsandSubscriptsinMATLAB .................. 4-2
剩余389页未读,继续阅读
xad111
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- RTL8188FU-Linux-v5.7.4.2-36687.20200602.tar(20765).gz
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
- SPC统计方法基础知识.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2