top of page

Generate random matrix of desired number of columns and rows (MATLAB)

Updated: Apr 25, 2021

1. Open your command window

2. Say, you want to create a random matrix of 4 rows and 5 columns with the matrix name as "x". Type, x = rand(4,5)

3. Hit enter and you'll find your matrix is output. Each time you write the same command you will get a matrix containing different elements

4. Type "clc" to clear out your command window


17 views0 comments

Recent Posts

See All

Comments


©2021 by Tech Aficionado.

  • 0c23332059f19519c291c00496b5f056
  • Facebook
  • Twitter
  • LinkedIn
bottom of page