Introduction to scientific Computing A Matrix Vector Approach Using Matlab Written by Charles FVan Loan 陈文斌 Wbchen(fudan. edu. cn 复日大学
Introduction to Scientific Computing -- A Matrix Vector Approach Using Matlab Written by Charles F.Van Loan 陈 文 斌 Wbchen@fudan.edu.cn 复旦大学
网上的材料 http://www.cs.cornelledu/cv http:/www.netlib.org/index.html http:/www.scicomput.com
网上的材料 • http://www.cs.cornell.edu/cv • http://www.netlib.org/index.html • http://www.scicomput.com
Chapter I power tools of the trade Vectors and Plotting 2. More vectors. More plotting and new Matrices 3. Building Exploratory Environments 4. Error 5. Designing Functions
Chapter 1Power tools of the trade 1. Vectors and Plotting 2. More Vectors, More Plotting and New Matrices 3. Building Exploratory Environments 4. Error 5. Designing Functions
MATLAB File Edit View Web Window Help 日》c等|?| Current Directory. C: MATLAB6p1 to Launch Pad xxⅢ Command window +MATLAB 中 Communi cati ons Toolbox To et started, select "MATLAB Help"from the Help menu -control System Toolbox >>intro t4A Data Acquisition Toolbox > demo Database Toolbox >>k <DAtafeed Toolbox 中1 lter Desi gn Toolbox +sA Financial Derivatives Toolbox 4 al Time Series Toolbox 中4 Financial Toolbox 中 Fuzzy Logic Toolbox 中4AGTo0lbox Six rocessIn Launch Pad Workspace windows ommand History ais([-33-33]) axis(square) %-2:28PM7/14/02--% -5:36PM7/14/02—% Command History Current Directory
Six windows
2 slideshow Player File Edit View Insert Tools Window Help MATLAB. The Language of Technical Computing Intro Start》 Prev >load logo Info >>surf[L, R] colormap[M] n= length[L[: 1): >>axis off, axis[[ 1 n 1 n. 2. 8], view[-375, 30 >>title[ MATLAB. The Language of Techical Computing. ] Close
intro
d MATLAB Demo window MATLAB Demo de emo I-MATLAB I MATLAB is an integrated technical computing Desktop Environment environment that combines numeric computation Matrices advanced graphics and visualization, and a Numerics I high-level programming language Graphi Language MATLAB includes hundreds of functions for Gallery Data analysis and visualization More examples Numeric and symbolic computation +Toolboxes Engineering and scientific graphics +Blocksets +Real-Time work shop Choose a subtopic to see a list of demos +stateflow Close Flur
demo
Vectors and nd Plotting Setting Up Vectors
Vectors and Plotting Setting Up Vectors
Setting Up Vectors Ⅹ=[10.120.230.3 X=[10.1;20.2;30.3] =[10.1;20.2;30.3]; ⅹ=[10.120.230.3
Setting Up Vectors • X=[10.1 20.2 30.3] • X=[10.1; 20.2; 30.3] • X=[10.1; 20.2; 30.3]; • X=[10.1 20.2 30.3]
°X=[0.05.10.1520253035404550 55.60.65.70.75808590.951.0 I Dimension 21 mismatch" error 21 h=1/(n) 2. Efficient( memory h=1/(n-1) zeros(l, n) for k=l:n for k=: n x(k)=(k-1)*h; x(k)=(k-1)*h; d eno end
• X=[0 .05 .10 .15 .20 .25 .30 .35 .40 .45 .50 … .55 .60 .65 .70 .75 .80 .85 .90 .95 1.0] n=21; h=1/(n-1); for k=1:n x(k)=(k-1)*h; end n=21; h=1/(n-1); x=zeros(1,n); for k=1:n x(k)=(k-1)*h; end 1 "Dimension mismatch" error 2. Efficient(memory)
In matlab variables are not declared by the user but are created on a need-to-use basis by a memory manager. Moreover, from Matlab's point of view, every variable is a complex matrix indexed from unity
In Matlab, variables are not declared by the user but are created on a need-to-use basis by a memory manager. Moreover, from Matlab's point of view, every variable is a complex matrix indexed from unity