Digital Signal Processing Reference
In-Depth Information
Gx1=Gx/(10ˆ3);
Gy1=Gy/(10ˆ3);
for x=0:1:siz-1
for y=0:1:siz-1
for i=1:1:n(x+1,y+1)
phi1=k(x+1,y+1,i)*0.1*2*pi;
%The magnetic moments after applying positive y-gradient for the duration of
%0.1
temp1(x+1,y+1,i)=exp(-j*((B0*gamma+gamma*y*d2*Gy1)*0.1-phi1+K));
%The magnetic moments after applying negative x-gradient for the duration of
%0.1 after applying the y-gradient for the duration of 0.1
phi2=k(x+1,y+1,i)*0.1*2*pi;
temp2(x+1,y+1,i)=exp(-j*((B0*gamma+d2*gamma*y*Gy1)*0.1-phi1+K))...
*exp(-j*((B0*gamma+gamma*d1*x*Gx1)*0.1-phi2));
%Apply 180 degree phase shift and allow it to dephase for 0.3 duration
phi3=k(x+1,y+1,i)*0.3*2*pi;
temp3(x+1,y+1,i)=exp(j*((B0*gamma+gamma*d2*y*Gy1)*0.1-phi1+K))...
*exp(j*((B0*gamma+gamma*d1*x*Gx1)*0.1-phi2))*...
exp(-j*((B0*gamma)*0.3-phi3));
%apply positive x-gradient for readout for the duration of 0.2
phi4=k(x+1,y+1,i)*0.2*2*pi;
temp3(x+1,y+1,i)=exp(j*((B0*gamma+gamma*d2*y*Gy1)*0.1-phi1+K))...
*exp(j*((B0*gamma+gamma*d1*x*Gx1)*0.1-phi2))*...
exp(-j*((B0*gamma)*0.3-phi3))*exp(-j*((B0*gamma+gamma*d1*x*Gx1)*0.2-phi4));
end
end
end
for x=0:1:siz-1
for y=0:1:siz-1
for i=1:1:n(x+1,y+1)
KSPACE(Gx+6,Gy+6)=KSPACE(Gx+6,Gy+6)+temp3(x+1,y+1,i);
end
end
end
end
end
KSPACEREARRANGED=KSPACE(6:1:11,6:1:11);
KSPACEREARRANGED=[KSPACEREARRANGED KSPACE(6:1:11,1:1:5)];
KSPACEREARRANGED=[KSPACEREARRANGED; KSPACE(1:1:5,6:1:11) KSPACE(1:1:5,1:1:5) ];
RECONSTRUCTED=abs(ifft2(KSPACEREARRANGED));
%But note that what we reconstructed is f(x,-y) and not f(x,y).
save T2DATA n k
FINALRECONSIMAGE=zeros(11,11);
FINALRECONSIMAGE(:,1)=RECONSTRUCTED(:,1);
for p=1:1:11
for q=2:1:11
FINALRECONSIMAGE(p,q)=RECONSTRUCTED(p,13-q);
end
end
Search WWH ::




Custom Search