10x10 Matrix

22 Ansichten (letzte 30 Tage)
Gulnabi sadat
Gulnabi sadat am 18 Apr. 2021
Kommentiert: Gulnabi sadat am 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.

Antworten (1)

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

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by