设为首页收藏本站

EPS数据狗论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1341|回复: 0

Matlab中的eval命令

[复制链接]

17

主题

117

金钱

199

积分

入门用户

发表于 2019-7-5 15:21:03 | 显示全部楼层 |阅读模式

Matlab中输入help eval
eval(EXPRESSION) evaluates the MATLAB code in the string EXPRESSION.
 
    [OUTPUT1,...,OUTPUTN] = eval(EXPRESSION) returns output from EXPRESSION
    in the specified variables.
 
    Example: Interactively request the name of a matrix to plot.
 
       expression = input('Enter the name of a matrix: ','s');
       if (exist(expression,'var'))
          plot(eval(expression))
       end

注释:eval命令是将括号中的字符串表达式当作Matlab命令来执行

例如:在Matlab中,输入a=1,跟eval('a=1')是等价的
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

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

客服中心
关闭
在线时间:
周一~周五
8:30-17:30
QQ群:
653541906
联系电话:
010-85786021-8017
在线咨询
客服中心

意见反馈|网站地图|手机版|小黑屋|EPS数据狗论坛 ( 京ICP备09019565号-3 )   

Powered by BFIT! X3.4

© 2008-2028 BFIT Inc.

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