没有合适的资源?快使用搜索试试~ 我知道了~
首页MATLAB的C++ 数学库使用手册
MATLAB的C++ 数学库使用手册
4星 · 超过85%的资源 需积分: 10 63 下载量 51 浏览量
更新于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币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- C++标准程序库:权威指南
- Java解惑:奇数判断误区与改进方法
- C++编程必读:20种设计模式详解与实战
- LM3S8962微控制器数据手册
- 51单片机C语言实战教程:从入门到精通
- Spring3.0权威指南:JavaEE6实战
- Win32多线程程序设计详解
- Lucene2.9.1开发全攻略:从环境配置到索引创建
- 内存虚拟硬盘技术:提升电脑速度的秘密武器
- Java操作数据库:保存与显示图片到数据库及页面
- ISO14001:2004环境管理体系要求详解
- ShopExV4.8二次开发详解
- 企业形象与产品推广一站式网站建设技术方案揭秘
- Shopex二次开发:触发器与控制器重定向技术详解
- FPGA开发实战指南:创新设计与进阶技巧
- ShopExV4.8二次开发入门:解决升级问题与功能扩展
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功