Not enough input arguments.

function [pz pdz pwz pzdw]=plsa(x,k)
err=0.0001;
[m n]=size(x);
pz=rand(1,k);
pz2=pz;
pz2(1)=pz2(1)+2*err;
pdz=rand(k,n);
pwz=rand(k,m);
pzdw=rand(m,n,k); %initialize
h=0;
Error using plsa (line 10) Not enough input arguments.

2 件のコメント

Adam
Adam 2015 年 11 月 4 日
編集済み: Adam 2015 年 11 月 4 日
Please format your code using the {} Code block. It's a pain to work out which is line 10 otherwise!
You also need to show how you are calling the function. It takes 2 arguments. Are you giving it 2 arguments?
Stephen23
Stephen23 2015 年 11 月 4 日
編集済み: Stephen23 2015 年 11 月 4 日
How are you calling the function plsa? Where is it called from? Please show us the code that you call this function with.

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

回答 (1 件)

Star Strider
Star Strider 2015 年 11 月 4 日

0 投票

You have to call the function from a script or the Command Window with the appropriate arguments. You cannot just run it as you would a script.

カテゴリ

ヘルプ センター および File ExchangeArgument Definitions についてさらに検索

質問済み:

h X
2015 年 11 月 4 日

編集済み:

2015 年 11 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by