声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1835|回复: 8

[工具箱] 工具箱使用出现的错误

[复制链接]
发表于 2006-9-26 17:22 | 显示全部楼层 |阅读模式

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

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

x
我安装了时频工具箱后,输入一个例子,如下所示:

sig=[fmlin(128,0.05,.45);fmlin(128,0.35,.15)];
tfr=tfrstft(sig);
subplot(211);imagesc(abs(tfr(1:128,:)));axis('xy')
subplot(212);imagesc(angle(tfr(1:128,:)));axis('xy')


但给我报这样的错误

??? Error using ==> window
Not enough input arguments.

Error in ==> TFRSTFT at 44
t=1:xrow; h = window(hlength); trace=0;

Error in ==> Untitled8 at 2
tfr=tfrstft(sig);

我不知道是怎么回事了,请知道的朋友给你解答一下撒,非常感谢!
回复
分享到:

使用道具 举报

发表于 2006-11-9 17:44 | 显示全部楼层
我也遇见了这样的问题
我觉得可能是时频工具箱里的window函数和matlab自身的window函数混淆导致
试着把时频工具箱里的window函数改了名字,结果就不能识别了

评分

1

查看全部评分

发表于 2006-11-9 19:52 | 显示全部楼层
  1. sig=[fmlin(128,0.05,.45);fmlin(128,0.35,.15)];
  2. tfr=tfrstft(sig);
  3. subplot(211);imagesc(abs(tfr(1:128,:)));axis('xy')
  4. subplot(212);imagesc(angle(tfr(1:128,:)));axis('xy')
复制代码

这个代码没什么问题

6.5没有window这个函数

你用which window.m找一下看是不是有多个window.m
如果是的话删除或者将非该工具箱中window.m改名

评分

1

查看全部评分

发表于 2006-11-9 20:28 | 显示全部楼层
时频工具箱中是WINDOW.m,信号处理工具箱中是window.m
工具箱的编写者把函数名都写成了大写的,但是在调用的时候又写小写的,matlab也可以识别,就是遇到这种WINDOW和window的时候就混淆了,我修改了一下,这个错误算是解决了
但是往下运行又遇到了别的错误
??? Error using ==> TFRVIEW
unsupported matlab version. please send an email.

Error in ==> TFRQVIEW at 182
   tfrview(tfr,sig,t,method,param,p1);

Error in ==> TFRSTFT at 82
tfrqview(abs(tfr).^2,x,t,'tfrstft',h);

版本问题?不会matlab2006a不能使用这个时频工具箱吧

评分

1

查看全部评分

发表于 2006-11-9 20:47 | 显示全部楼层
我在tfrview中看到这样的代码
MatlabVersion=version; MatlabVersion=str2num(MatlabVersion(1));
% I hope that future Matlab versions will be more compatible
if (MatlabVersion==4),
TickLabelStr='TickLabels';
elseif (MatlabVersion==5),
TickLabelStr='Ticklabel';
else
error('unsupported matlab version. please send an email.');
end;

肯定就是这个的问题了
怎么处理呢?
发表于 2006-11-9 20:53 | 显示全部楼层
呵呵,自己回答这个问题了
MatlabVersion=version; MatlabVersion=str2num(MatlabVersion(1));
% I hope that future Matlab versions will be more compatible
if (MatlabVersion==4),
TickLabelStr='TickLabels';
elseif (MatlabVersion==5),
TickLabelStr='Ticklabel';
elseif (MatlabVersion==7),
TickLabelStr='Ticklabel';
else
error('unsupported matlab version. please send an email.');
end;

看了下面的代码,作者做这个就是为了好看,没有实际的用途
为难了我这样的新手了
谢谢happy
发表于 2006-11-10 12:57 | 显示全部楼层
原帖由 mulan 于 2006-11-9 20:53 发表
呵呵,自己回答这个问题了
MatlabVersion=version; MatlabVersion=str2num(MatlabVersion(1));
% I hope that future Matlab versions will be more compatible
if (MatlabVersion==4),
TickLabelStr='TickLa ...


这个是有用的,估计是作者考虑到随着matlab的升级会出现不兼容的问题,因此加了类似的设置
error('unsupported matlab version. please send an email.');以提示大家

从这一设置上看4.x和5.x版本的是完全没有问题的
之后的版本可能会出现问题,是否真的会出现需要进行测试
发表于 2006-11-10 14:09 | 显示全部楼层
原帖由 happy 于 2006-11-10 12:57 发表


这个是有用的,估计是作者考虑到随着matlab的升级会出现不兼容的问题,因此加了类似的设置
error('unsupported matlab version. please send an email.');以提示大家

从这一设置上看4.x和5.x版本的是完全 ...



工具箱的确会出现有类似的问题,手动修改一下就好了,2006a和2006b版本的分别用下面的语句检查:
strcmp(version('-release'),'2006a') 和 strcmp(version('-release'),'2006b')
发表于 2007-10-18 15:25 | 显示全部楼层
请问到底怎么解决啊,我也是遇上了同样的问题
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-5-5 19:06 , Processed in 0.062139 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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