MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   【求助】image和imagesc (https://www.labfans.com/bbs/showthread.php?t=1626)

249573317 2008-03-10 16:23

【求助】image和imagesc
 
[x,y]=meshgrid(-2:0.5:2,-2:0.5:2)
t=x.*exp(-x.^-y.^2)
[px,py]=gradient(t,0.05,0.05)
td=sqrt(px.^2+py.^2)
subplot(221)
imagesc(t)
subplot(222)
imagesc(td)
colormap('gray')
运行,无图象
??? Error using ==> image
Error using ==> image
Image CData can not be complex.

Error in ==> imagesc at 19
hh = image(varargin{1},'CDataMapping','scaled');

Error in ==> wangge at 6
imagesc(t)
。。。这是怎么搞的,用which imagesc 查到imagesc-M文件,没有新建过同名文件。
image和imagesc有何区别?

shiqiang 2008-03-10 17:59

t=x.*exp(-x.^2-y.^2)你的程序中是不是应该是这个样子的。。

shiqiang 2008-03-10 18:00

改正之后运行结果正常,你尝试一下,看看是不是问题出在这。


所有时间均为北京时间。现在的时间是 05:02

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.