How to generate a random 2x2 matrix with values in the range −1 to 1

4 次查看(过去 30 天)
Hi, I'm new to matlab and trying to generate a random 2x2 matrix with values in the range -1 to 1.
Thank you for your time.

采纳的回答

Star Strider
Star Strider 2016-10-27
This works:
M = 2*rand(2)-1;
  4 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

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