matlab 1

matlab 1 - A=rand(3,5) would create a 3 x 5 matrix of...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
j : k  is the same as  j, j+1,  j+2, . .., k a : b : c  is the same as  a, a + b, a+2*b, . ..c  A( : , j )  is the j-th column of A A( i , : )  is the i-th row of A A( : , : )  is the same as A A( : , j : k )  is the same as A( : , j ), A(: , j+1 ), . .. ,  A( : , k)   Working with Matrices Creating and Concatenating Matrices  Help on the  rand  Function   The  rand(n,m)  function creates an  n x m  matrix with uniformly distributes random numbers from the  interval [0,1]; for example the following  Matlab instruction:   
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: A=rand(3,5) would create a 3 x 5 matrix of random numbers between 0 an 1. To generate a uniform distribution of random numbers on a specified interval [a,b], multiply the output of rand by (b-a) then add a. 14. Assume the following definitions: m=[1 2 3;-4 5 6;7 -8 9] ; b=[10 11 12]; c=[14;15;16] ; i=1:3 (a) Show the matrix m and vectors b and c created by the above statements. m = 1 2 3 4 5 6 7 -8 9 b = 10 11 12 c = 14 15 16...
View Full Document

This note was uploaded on 04/21/2010 for the course CHE 2160 taught by Professor Cygan during the Fall '09 term at LSU.

Page1 / 2

matlab 1 - A=rand(3,5) would create a 3 x 5 matrix of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online