24小时热门版块排行榜    

查看: 346  |  回复: 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)

我们都爱小木虫

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

科研从小木虫开始,人人为我,我为人人
相关版块跳转 我要订阅楼主 浪漫的枯 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 0703化学调剂 +10 妮妮ninicgb 2026-03-15 14/700 2026-03-19 22:59 by 学员8dgXkO
[考研] 复试调剂 +4 z1z2z3879 2026-03-14 6/300 2026-03-19 17:18 by fei626-918
[考博] 东华理工大学化材专业26届硕士博士申请 +8 zlingli 2026-03-13 8/400 2026-03-19 16:32 by 轻松不少随
[考研] 085601材料工程专硕求调剂 +10 慕寒mio 2026-03-16 10/500 2026-03-19 15:26 by 丁丁*
[考研] 本人考085602 化学工程 专硕 +17 不知道叫什么! 2026-03-15 19/950 2026-03-19 15:06 by 尽舜尧1
[考研] 085600材料与化工调剂 324分 +10 llllkkkhh 2026-03-18 12/600 2026-03-19 14:33 by llllkkkhh
[考研] 材料080500调剂求收留 +4 一颗meteor 2026-03-13 4/200 2026-03-19 10:32 by 30660438
[考研] 304求调剂 +6 司空. 2026-03-18 6/300 2026-03-18 23:03 by 星空星月
[考研] 295求调剂 +3 一志愿京区211 2026-03-18 5/250 2026-03-18 17:03 by zhaoqian0518
[考研] 302求调剂 +10 呼呼呼。。。。 2026-03-17 10/500 2026-03-18 12:45 by Linda Hu
[基金申请] 被我言中:新模板不强调格式了,假专家开始管格式了 +4 beefly 2026-03-14 4/200 2026-03-17 22:04 by 黄鸟于飞Chao
[考研] 268求调剂 +8 一定有学上- 2026-03-14 9/450 2026-03-17 17:47 by laoshidan
[考研] 一志愿苏州大学材料工程(085601)专硕有科研经历三项国奖两个实用型专利一项省级立项 +6 大火山小火山 2026-03-16 8/400 2026-03-17 15:05 by 无懈可击111
[考研] 一志愿,福州大学材料专硕339分求调剂 +3 木子momo青争 2026-03-15 3/150 2026-03-17 07:52 by laoshidan
[考研] 274求调剂 +5 时间点 2026-03-13 5/250 2026-03-17 07:34 by 热情沙漠
[考研] 321求调剂 +5 大米饭! 2026-03-15 5/250 2026-03-16 16:33 by houyaoxu
[考研] 070303 总分349求调剂 +3 LJY9966 2026-03-15 5/250 2026-03-16 14:24 by xwxstudy
[考研] 0856求调剂 +3 刘梦微 2026-03-15 3/150 2026-03-16 10:00 by houyaoxu
[考研] 26考研一志愿中国石油大学(华东)305分求调剂 +3 嘉年新程 2026-03-15 3/150 2026-03-15 13:58 by 哈哈哈哈嘿嘿嘿
[考研] 中科大材料专硕319求调剂 +3 孟鑫材料 2026-03-13 3/150 2026-03-14 18:10 by houyaoxu
信息提示
请填处理意见