10x10 Matrix

20 views (last 30 days)
Gulnabi sadat
Gulnabi sadat on 18 Apr 2021
Commented: Gulnabi sadat on 18 Apr 2021
Create a 10x10 matrix with random numbers between 0 and 10. Now, make all elements in the first row
and first column equal to 1.

Answers (1)

David Fletcher
David Fletcher on 18 Apr 2021
a=ones(10);
a(2:end,2:end)=randi([0 10],9)
  1 Comment
Gulnabi sadat
Gulnabi sadat on 18 Apr 2021
Thank so much! It worked

Sign in to comment.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!