matlab报错?Error:File:D:\matlab7\work\fitness.m Line:1 Column:

问题描述:

matlab报错?Error:File:D:\matlab7\work\fitness.m Line:1 Column:40 Missing variable or functio
function[sol,eval]=fitness(sol,options)          
x=sol(1);          
eval=x+10*sin(5*x)+7*cos(4*x); 
运行
Error:File:D:\matlab7\work\fitness.m Line:1 Column:40
Missing variable or function.
怎么回事
我试了 还是不行 是不是我的软件有问题
1个回答 分类:综合 2014-11-17

问题解答:

我来补答
调用过程、函数,后面没有加“;”
过程函数名错误
参数见没用“,”隔开
少了“(”、或“)”
下面是编译错误代码中英对照
错误代码及错误信息错误释义
error1:Outofmemory内存溢出
error2:Identifierexpected缺标识符
error3:Unknownidentifier未定义的标识符
error4:Duplicateidentifier重复定义的标识符
error5:Syntaxerror语法错误
error6:Errorinrealconstant实型常量错误
error7:Errorinintegerconstant整型常量错误
error8:Stringconstantexceedsline字符串常量超过一行
error10:Unexpectedendoffile文件非正常结束
error11:Linetoolong行太长
error12:Typeidentifierexpected未定义的类型标识符
error13:Toomanyopenfiles打开文件太多
error14:Invalidfilename无效的文件名
error15:Filenotfound文件未找到
error16:Diskfull磁盘满
error17:Invalidcompilerdirective无效的编译命令
error18:Toomanyfiles文件太多
error19:Undefinedtypeinpointerdef指针定义中未定义类型
error20:Variableidentifierexpected缺变量标识符
error21:Errorintype类型错误
error22:Structuretoolarge结构类型太长
error23:Setbasetypeoutofrange集合基类型越界
error24:Filecomponentsmaynotbefilesorobjectsfile分量不能是文件或对象
error25:Invalidstringlength无效的字符串长度
error26:Typemismatch类型不匹配
error27:error27:Invalidsubrangebasetype无效的子界基类型
error28:Lowerboundgreaterthanupperbound下界超过上界
error29:Ordinaltypeexpected缺有序类型
error30:Integerconstantexpected缺整型常量
error31:Constantexpected缺常量
error32:Integerorrealconstantexpected缺整型或实型常量
error33:PointerTypeidentifierexpected缺指针类型标识符
error34:Invalidfunctionresulttype无效的函数结果类型
error35:Labelidentifierexpected缺标号标识符
error36:BEGINexpected缺BEGIN
error37:ENDexpected缺END
error38:Integerexpressionexpected缺整型表达式
error39:Ordinalexpressionexpected缺有序类型表达式
error40:Booleanexpressionexpected缺布尔表达式
error41:Operandtypesdonotmatch操作数类型不匹配
error42:Errorinexpression表达式错误
error43:Illegalassignment非法赋值
error44:Fieldidentifierexpected缺域标识符
error45:Objectfiletoolarge目标文件太大
error46:Undefinedexternal未定义的外部过程与函数
error47:Invalidobjectfilerecord无效的OBJ文件格式
error48:Codesegmenttoolarge代码段太长
error49:Datasegmenttoolarge数据段太长
error50:DOexpected缺DO
error51:InvalidPUBLICdefinition无效的PUBLIC定义
error52:InvalidEXTRNdefinition无效的EXTRN定义
error53:ToomanyEXTRNdefinitions太多的EXTRN定义
error54:OFexpected缺OF
error55:INTERFACEexpected缺INTERFACE
error56:Invalidrelocatablereference无效的可重定位引用
error57:THENexpected缺THEN
error58:TOorDOWNTOexpected缺TO或DOWNTO
error59:Undefinedforward提前引用未经定义的说明
error61:Invalidtypecast无效的类型转换
error62:Divisionbyzero被零除
error63:Invalidfiletype无效的文件类型
error64:Cannotreadorwritevariablesofthistype不能读写此类型变量
error65:Pointervariableexpected缺指针类型变量
error66:Stringvariableexpected缺字符串变量
error67:Stringexpressionexpected缺字符串表达式
error68:Circularunitreference单元UNIT部件循环引用
error69:Unitnamemismatch单元名不匹配
error70:Unitversionmismatch单元版本不匹配
error71:Internalstackoverflow内部堆栈溢出
error72:Unitfileformaterror单元文件格式错误
error73:IMPLEMENTATIONexpected缺IMPLEMENTATION
error74:Constantandcasetypesdonotmatch常量和CASE类型不匹配
error75:Recordorobjectvariableexpected缺记录或对象变量
error76:Constantoutofrange常量越界
error77:Filevariableexpected缺文件变量
error78:Pointerexpressionexpected缺指针表达式
error79:Integerorrealexpressionexpected缺整型或实型表达式
error80:Labelnotwithincurrentblock标号不在当前块内
error81:Labelalreadydefined标号已定义
error82:Undefinedlabelinprecedingstatementpart在前面未定义标号
error83:Invalid@argument无效的@参数
error84:UNITexpected缺UNIT
error85:";"expected缺“;”
error86:":"expected缺“:”
error87:","expected缺“,”
error88:"("expected缺“(”
error89:")"expected缺“)”
error90:"="expected缺“=”
error91:":="expected缺“:=”
error92:"["or"(."Expected缺“[”或“(.”
error93:"]"or".)"expected缺“〕”或“.)”
error94:"."expected缺“.”
error95:".."expected缺“..”
error96:Toomanyvariables变量太多
error97:InvalidFORcontrolvariable无效的FOR循环控制变量
error98:Integervariableexpected缺整型变量
error99:Filesandproceduretypesarenotallowedhere该处不允许文件和过程类型
error100:Stringlengthmismatch字符串长度不匹配
error101:Invalidorderingoffields无效域顺序
error102:Stringconstantexpected缺字符串常量
error103:Integerorrealvariableexpected缺整型或实型变量
error104:Ordinalvariableexpected缺有序类型变量
error105:INLINEerrorINLINE错误
error106:Characterexpressionexpected缺字符表达式
error107:Toomanyrelocationitems重定位项太多
error108:Overflowinarithmeticoperation算术运算溢出
error112:CASEconstantoutofrangeCASE常量越界
error113:Errorinstatement表达式错误
error114:Cannotcallaninterruptprocedure不能调用中断过程
error116:Mustbein8087modetocompilethis必须在8087模式编译
error117:Targetaddressnotfound找不到目标地址
error118:Includefilesarenotallowedhere该处不允许INCLUDE文件
error119:Noinheritedmethodsareaccessiblehere该处继承方法不可访问
error121:Invalidqualifier无效的限定符
error122:Invalidvariablereference无效的变量引用
error123:Toomanysymbols符号太多
error124:Statementparttoolarge语句体太长
error126:Filesmustbevarparameters文件必须是变量形参
error127:Toomanyconditionalsymbols条件符号太多
error128:Misplacedconditionaldirective条件指令错位
error129:ENDIFdirectivemissing缺ENDIF指令
error130:Errorininitialconditionaldefines初始条件定义错误
error131:Headerdoesnotmatchpreviousdefinition和前面定义的过程或函数不匹配
error133:Cannotevaluatethisexpression不能计算该表达式
error134:Expressionincorrectlyterminated表达式错误结束
error135:Invalidformatspecifier无效格式说明符
error136:Invalidindirectreference无效的间接引用
error137:Structuredvariablesarenotallowedhere该处不允许结构变量
error138:CannotevaluatewithoutSystemunit没有System单元不能计算
error139:Cannotaccessthissymbol不能存取符号
error140:Invalidfloatingpointoperation无效的符号运算
error141:Cannotcompileoverlaystomemory不能编译覆盖模块至内存
error142:Pointerorproceduralvariableexpected缺指针或过程变量
error143:Invalidprocedureorfunctionreference无效的过程或函数调用
error144:Cannotoverlaythisunit不能覆盖该单元
error146:Fileaccessdenied不允许文件访问
error147:Objecttypeexpected缺对象类型
error148:Localobjecttypesarenotallowed不允许局部对象类型
error149:VIRTUALexpected缺VIRTUAL
error150:Methodidentifierexpected缺方法标识符
error151:Virtualconstructorsarenotallowed不允许虚构造函数
error152:Constructoridentifierexpected缺构造函数标识符
error153:Destructoridentifierexpected缺析构函数标识符
error154:Failonlyallowedwithinconstructors只能在构造函数内使用Fail标准过程
error155:Invalidcombinationofopcodeandoperands操作数与操作符无效组合
error156:Memoryreferenceexpected缺内存引用指针
error157:Cannotaddorsubtractrelocatablesymbols不能加减可重定位符号
error158:Invalidregistercombination无效寄存器组合
error159:286/287instructionsarenotenabled未激活286/287指令
error160:Invalidsymbolreference无效符号指针
error161:Codegenerationerror代码生成错误
error162:ASMexpected缺ASM
error166:Procedureorfunctionidentifierexpected缺过程或函数标识符
error167:Cannotexportthissymbol不能输出该符号
error168:Duplicateexportname外部文件名重复
error169:Executablefileheadertoolarge可执行文件头太长
error170:Toomanysegments段太多
 
 
展开全文阅读
剩余:2000
下一页:先解十一题