Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 matlab 从文件夹中随机访问文件。你能建议如何去做吗?我打算使用randn功能,但我不明白如何。
randn
我认为你需要一个分布均匀的随机数,而不是正常的。所以给你..
Files = dir('MyFolder'); N = size(Files,1) - 2; rand = randi(N,1); Random_filename = Files(rand+2,1).name;