How to write to make a computation grid with random numbers?
Show older comments
I have a grid where -9 ≤x≤9, -8≤y≤8, step size of 0.2.
In order to find all the local minima contained within this computational grid, for a given function, I want to run 150 Gradient Descent searches (for which I have written a function already) using randomised starting points
I know I need to use rand to populate x and y with valuesbetween 0 and 1,but I don't know how to do this and scale up these values to the limits of the numerical grid -9 ≤x≤9, -8≤y≤8, step size of 0.2.
Would anyone be able to explain how i can make this grid?
Thanks in advance!
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!