声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1614|回复: 4

[编程技巧] Input argument 'sol' is undefined 出错求助

[复制链接]
发表于 2008-1-15 19:58 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
function [sol,val]=SourceMin(sol,options)
%Calculate R01, R02 and Q value using GA method at a frequency
%
R01=sol(1); R02=sol(2); c=sol(3);
为什么运行就出现??? Input argument 'sol' is undefined.

Error in ==> D:\kuangzhen\gaot\SourceMin.m
On line 5  ==> R01=sol(1);
的错误呢?请各位指点

[ 本帖最后由 ChaChing 于 2010-3-6 12:17 编辑 ]
回复
分享到:

使用道具 举报

发表于 2008-1-15 20:12 | 显示全部楼层
[sol,val]=SourceMin(sol,options)
改成
[solve,val]=SourceMin(sol,options)
试试
 楼主| 发表于 2008-1-15 20:35 | 显示全部楼层
不行,还是同样的错误
发表于 2008-1-15 21:39 | 显示全部楼层

回复 3楼 的帖子

调用的时候sol传进去了吗

[solve,val]=SourceMin([1 2 3],options)
直接运行这句试试

[ 本帖最后由 ChaChing 于 2010-3-6 12:16 编辑 ]

评分

1

查看全部评分

发表于 2008-1-21 19:04 | 显示全部楼层
请楼主先看看置顶贴,答案就在里面
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-25 09:34 , Processed in 0.100766 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表