what is the result?

3 次查看(过去 30 天)
diadalina
diadalina 2017-10-24
回答: KL 2017-10-24
Pull 20 numbers randomly in the interval [0; 1]. What is the minimum value of the vector and the position of the Coefficient which realizes?
  5 个评论
per isakson
per isakson 2017-10-24
Read the documentation on min once more
[ m, ix ] = min( x );
diadalina
diadalina 2017-10-24
编辑:diadalina 2017-10-24
yes, you're right, i can obtain the minimum value of the vector and the position of the Coefficient which realizes with the command min,but the first part of the question, how can i do it, can you help me please ?

请先登录,再进行评论。

采纳的回答

KL
KL 2017-10-24
Did you read the documentation of rand?
It says X = rand returns a single uniformly distributed random number in the interval (0,1)
So to generate 20 random numbers, you would use,
X = rand(20,1);
Then you can use min to find the value and index of the minimum value.

更多回答(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