How to implement this pseudocode as script

2 次查看(过去 30 天)
n= a randomly chosen integer between 1 and 10^6

采纳的回答

Jan
Jan 2018-3-7
编辑:Jan 2018-3-7
n = randi([1, 1e6], 1)
You can find this by your own, if you ask an internet search engine for "Matlab random integer". One of the links is the documentation of randi.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by