Problem using the matlab function randsample
显示 更早的评论
I ask randsample to return a random samples from a 1 x 78000 vector with second argument being 50
example:
randsample(vector,50)
It throws an error message reading:
Error using randi
Too many input arguments.
Error in randsample line 153
x(randi(n,1,k-sumx)) = 1; sample w/replacement
I've tried the matlab example too, and it returns the same error message.
Any suggestions?
1 个评论
Adam
2019-10-9
Works fine for me with a 1 x 78000 vector of random values. Are you using your offline help or online help? And are you using Matlab R2019b? If not you should always refer to your offline help, even if you first do an online search to find a help page. I have no idea if randsample has changed in recent versions though since it has been in the software since before 2006.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 DCAM Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!