24小时热门版块排行榜    

CyRhmU.jpeg
查看: 322  |  回复: 0

浪漫的枯

新虫 (初入文坛)

[求助] 关于MATLAB编程的小问题,求解答

前段时间刚开学,老师让我简单编写个小程序,可是我MATLAB实在是有够烂的,搞不出来,急死了,希望有大神随便动下鼠标帮我一下。
      下面是老师给我的小作业指示:
The file (P02560.7) is the raw data acquired on a 3T scanner, with single-slice. It has a header of 61464 at the front. After the header, it contains the k-space data of a 256x256 single image. The raw data is in complex short integer.
1) Please read the P02560.7 file using fopen, fseek, fread, fclose functions in MATLAB. Using imshow and abs function to show the k-space data.
2)You can use reshape, zeros and ifft2, ifftshift functions to reconstruct the brain image.Using imshow ,abs and angle functions to show the magnitude and phase of the reconstructed image.
3) Please use help documents to find the details of these functions.

这个P02560.7是个K空间数据文件,我没有上传,只想知道该怎么编写代码,有好多指令都不熟,下面是一个师兄帮我随便写的,,虽然图像出来了,好像还是不太对,求万能的jrs搭救:fid=fopen('P02560.7','r+');
status=fseek(fid,61465,'bof');
A=fread(fid,[256,256],'int16');
A=double(A);
K=A/(max(max((abs(A)))));
figure,imshow(abs(K),[]);
data = 1/sqrt(length(K())*ifftshift(ifft2(fftshift(K)));
figure,imshow(abs(data),[]);
IG=ifftshift(fft2(ifftshift(data)));
figure,imshow(abs(IG),[]);


顺便问下,加下划线的这3句为什么这样用?
ps:http://pan.baidu.com/s/1mg5LxVi,,这是P02560.7 文件的链接。
回复此楼
情场浪子女见愁
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

找到一些相关的精华帖子,希望有用哦~

科研从小木虫开始,人人为我,我为人人
相关版块跳转 我要订阅楼主 浪漫的枯 的主题更新
信息提示
请填处理意见