在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 4708|回复: 7

求助为什么这个matlab程序不能run

[复制链接]
发表于 2012-10-5 15:48:22 | 显示全部楼层 |阅读模式

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

您需要 登录 才可以下载或查看,没有账号?注册

x
本帖最后由 eecsseudl 于 2013-4-29 09:56 编辑

求助为什么这个matlab程序不能运行

balance = 1000;
rate = 0.09;
interest = rate * balance;
balance = balance + interest;
disp ( 'New balance:');
disp (balance);


***********************************************************
Error: File: balance.m Line: 1 Column: 1
The variable "balance" is also the name of this script.
This is illegal, because it will be the name of a script and a variable
in any context from which the script is called.






发表于 2012-10-6 11:39:19 | 显示全部楼层
英文注释告诉你程序名字balance和变量名balance相同,是非法语句
发表于 2012-10-6 15:42:24 | 显示全部楼层
错误提示写得很清楚的啊
发表于 2012-10-31 08:29:31 | 显示全部楼层
你换个名字试试
发表于 2012-10-31 08:47:09 | 显示全部楼层
把balance改成其它合法的名称就好了
发表于 2012-11-17 21:52:07 | 显示全部楼层
matlab的m文件名,限制颇多的。
需要注意
发表于 2013-11-10 13:31:15 | 显示全部楼层
没有看到New balance的定义啊
发表于 2013-11-14 16:26:06 | 显示全部楼层
把balance改成其它合法的名称就好了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-19 02:35 , Processed in 0.040340 second(s), 12 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表