"Error using perceptron Too many output arguments. "

조회 수: 2 (최근 30일)
Mauricio
Mauricio 2020년 9월 17일
답변: Prasanth 2020년 9월 21일
I have this simple code copied from matlab:
P = [0 2];
T = [0 1];
net = perceptron;
net = configure(net,P,T);
However, I get the following error:
Error using perceptron
Too many output arguments.
Any help will be highly appreciated..
  댓글 수: 1
Dana
Dana 2020년 9월 18일
Which line throws the error? net = perceptron; or net = configure(net,P,T);?

댓글을 달려면 로그인하십시오.

답변 (1개)

Prasanth
Prasanth 2020년 9월 21일
I am assuming that you are using MATLAB R2019a. Try running the following script on MATLAB command window:
>> which perceptron
This command determines which function script is being called along with the path of the file. You should get the following output. Here, matlabroot is the location where MATLAB is installed.
matlabroot\toolbox\nnet\nnet\nnnetwork\perceptron.m
If your output is different from the above, it means that there are file(s) named 'perceptron.m' on your path which is/are overriding the inbuilt function. Try renaming/removing those file(s) and run the code again. This should run fine.
Refer to the following documentation link to get insights on how MATLAB determines the function precedence order.
Hope this helps.

Community Treasure Hunt

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

Start Hunting!

Translated by