"Too many input arguments." error in slicesample command execution

1 回表示 (過去 30 日間)
Khoa Tran
Khoa Tran 2013 年 10 月 3 日
コメント済み: Khoa Tran 2013 年 10 月 3 日
Dear Matlab community,
I tried using the slicesample function in the Statistics toolbox by running the following example:
f = @(x) exp(-x.^2/2).*(1 + (sin(3*x)).^2).*...
(1 + (cos(5*x).^2));
N = 2000;
x = slicesample(1,N,'pdf',f);
I get the following error:
Error using slicesample
Too many input arguments.
What is going wrong? By using "ver", I know I do have the Statistics toolbox installed
Statistics Toolbox Version 8.2
Best regards!
Khoa.
  1 件のコメント
Khoa Tran
Khoa Tran 2013 年 10 月 3 日
I've realised that in a local folder, I have another m-file with the same name so the cause of my problem. Never mind, I fixed it now.

サインインしてコメントする。

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by