1 / 55
文档名称:

Numerical Computing with MatLab, Intro.pdf

格式:pdf   页数:55
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Numerical Computing with MatLab, Intro.pdf

上传人:kuo08091 2014/4/4 文件大小:0 KB

下载得到文件列表

Numerical Computing with MatLab, Intro.pdf

文档介绍

文档介绍:Chapter 1
Introduction to MATLAB
This book is an introduction to two subjects: Matlab and puting.
This first chapter introduces Matlab by presenting several programs that inves-
tigate elementary, but interesting, mathematical problems. If you already have
some experience programming in another language, we hope that you can see how
Matlab works by simply studying these programs.
If you want a prehensive introduction, an on-line manual from The
MathWorks is available. Select Help in the toolbar atop the mand
window, then select MATLAB Help and Getting Started. A PDF version is
available under Printable versions. The document is also available from The
MathWorks Web site [10]. Many other manuals produced by The MathWorks are
available on line and from the Web site.
A list of over 600 Matlab-based books by other authors and publishers, in sev-
eral languages, is available at [11]. Three introductions to Matlab are of particular
interest here: a relatively short primer by Sigmon and Davis [8], a medium-sized,
mathematically oriented text by Higham and Higham [3], and a large, comprehen-
sive manual by Hanselman and Littlefield [2].
You should have a copy of Matlab close at hand so you can run our sample
programs as you read about them. All of the programs used in this book have been
collected in a directory (or folder) named
NCM
(The directory name is the initials of the book title.) You can either start Matlab
in this directory or use
pathtool
to add the directory to the Matlab path.
December 26, 2005
1
2 Chapter 1. Introduction to MATLAB
The Golden Ratio
What is the world’s most interesting number? Perhaps you like π, or e, or 17.
Some people might vote for φ, the golden ratio, computed here by our first Matlab
statement.
phi = (1 + sqrt(5))/2
This produces
phi =

Let’s see more digits.
format long
phi
phi =

This didn’t pute φ, it just displayed 15 significant digits instead of 5.
The go