声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1228|回复: 1

[编程技巧] eval 的问题

[复制链接]
发表于 2007-4-23 16:54 | 显示全部楼层 |阅读模式

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

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

x
clear all;
%Input the signal of file
pause on;
FileName=input('Please input the signal file:','s');
Fs=input('Please input the frequency(Hz):');
%=====================================
load(FileName);
temp=strtok(FileName,'.');
s=eval(temp);
s=s-mean(s);
xlen=max(size(s));
t=(1:xlen)/Fs;
f=(1:xlen/2)*Fs/xlen;

上面这段程序中eval是什么意思?为什么我在运行这段程序的时候s=eval(temp);这句出现错误,错误如下:
??? Error: Missing variable or function.
Error in ==> B27 at 8
s=eval(temp);
初学者,有哪位大虾,给帮帮忙!很急~

[ 本帖最后由 eight 于 2007-4-23 17:10 编辑 ]
回复
分享到:

使用道具 举报

发表于 2007-4-23 16:57 | 显示全部楼层
原帖由 smzxzl 于 2007-4-23 16:54 发表
clear all;
%Input the signal of file
pause on;
FileName=input('Please input the signal file:','s');
Fs=input('Please input the frequency(Hz):');
%=====================================
load( ...


help eval
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-4-24 14:50 , Processed in 0.162659 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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