1 view (last 30 days)

Show older comments

Hello

I want to generate random numbers for matrix A which has a second page(i.e. 2), whose values i am going to assign to another varaiable in my code. Though i have the rng command to reproduce the same random numbers, the very numbers in the second page do vary in every iteration..How can I regenerate the same random numbers in each iteration for the second page of my matrix A? Any idea is highly appreciated.

rng('default');

rng(1);

Nmc=200

uu=1

A=rand(Nmc,uu+1,2);

James Tursa
on 21 Apr 2021

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

Start Hunting!