{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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:   
Image of page 1

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

View Full Document Right Arrow Icon
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern