10x10 Matrix

22 次查看(过去 30 天)
Gulnabi sadat
Gulnabi sadat 2021-4-18
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.

回答(1 个)

David Fletcher
David Fletcher 2021-4-18
a=ones(10);
a(2:end,2:end)=randi([0 10],9)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by