Question: 2 . Use the built - in function 'rand' to generate ( 1 times 1 0 0 ) random vector (

2. Use the built-in function 'rand' to generate \(1\times 100\) random vector \( v \). Then make your own programming codes to solve the following problems (do not use built-in functions) :
(1) find the maximum and minimum values.
(2) find a number closest to 0.4.
(3) find how many components of the vector are between 0.2 and 0.5.
(4) rearrange the vector \( v \) in the decreasing order.
2 . Use the built - in function 'rand' to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!