??? Too many input arguments Error

조회 수: 1 (최근 30일)
Hamid
Hamid 2014년 12월 3일
편집: per isakson 2014년 12월 4일
Hi everybody
[Coord,Edof,Ep]=bintranslate(available,chromosome,Dof,fixedcoord,na,nb,neft,nl,no,nn,numbitCoordX,numbitCoordY,numbitCoordZ,numbitEp,xspan,yspan,zspan);
all of the inputs are defined, please help.
  댓글 수: 4
per isakson
per isakson 2014년 12월 3일
That's not an output of which. It should look more like this
>> which bintranslate -all
'bintranslate' not found.
>> which plot -all
built-in (C:\Program Files\MATLAB\R2013a\toolbox\matlab\graph2d\plot)
C:\Program Files\MATLAB\R2013a\toolbox\matlab\timeseries\@timeseries
etc.
Hamid
Hamid 2014년 12월 3일
thank you for helping me.
I attached bintranslate function.

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

답변 (2개)

Thorsten
Thorsten 2014년 12월 3일
Please double check that your function is called with 17 inputs.
Such a large number of inputs is error prone. Try do define the function with fewer arguments of higher dimension, e.g. span = [xspan, yspan, zspan];

per isakson
per isakson 2014년 12월 3일
편집: per isakson 2014년 12월 4일
There are two errors in your call of the function
  • The function is defined with two output arguments, [Coord,Ep]. The call contains three [Coord,Edof,Ep]
  • The function has 16 input arguments. The call has 17. The difference is Dof
This call passes at least the check of the numbers of inputs and outputs
>> [Coord,Ep]=bintranslate(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);
Warning: This concatenation operation includes an empty array with an
incorrect number of columns. ...
&nbsp
InputPreprocessor shows how I handle functions with many input arguments.
  댓글 수: 1
Andrew Reibold
Andrew Reibold 2014년 12월 3일
Sometimes I wonder what would happen if people read the error messages

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

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by