声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 945|回复: 2

[编程技巧] 问大家个实验题

[复制链接]
发表于 2008-11-15 02:02 | 显示全部楼层 |阅读模式

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

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

x
(a) Generate a 256 × 256 grey level image M showing a sine in the horizontal direction with a period of 16 pixels. Display the image using the commands :
imagesc(M)
colormap(gray);
Plot the magnitude of the frequency spectrum (both linear and logarithmic) and interpret the result. With the fftshift command you can put DC at the center of your plot. Display the axes in periods per pixel using command imagesc(...,...,fftshift(...)).
(b) Now generate a 256 × 256 image with a sine in the vertical direction and a period of 32 pixels. Sum both images together and interpret the resulting spectrum.

那个。。英语不好。。再加上刚接触Matlab
希望大家指点一下
回复
分享到:

使用道具 举报

发表于 2008-11-15 07:03 | 显示全部楼层
可以查字典啊,再说都是比较简单的单词
 楼主| 发表于 2008-11-15 19:53 | 显示全部楼层
意思我大概搞明白了,就是生成周期为16和32的正弦波,一个水平方向一个垂直方向,整个画面尺寸是256*256

我大概画了一下,但是不是预想的那样
横坐标我用了一个循环表示
t=[0,255]
16周期的纵坐标我用这个公式
sin(2*pi*16*t)
但是纵坐标的幅度为什么越来越大,我觉得应该是一个很标准的正弦函数。

大家帮我看看是我思路错了还是怎么回事
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-9-23 03:14 , Processed in 0.050521 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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