Hi I am trying to make a map (Q). Everything goes well except for the section that delatR2_st = deltaR2_star .^(2/3); where this command creates a double complex matrix, and I dont want it to be complex. And this creates an error for the last command where I try to create the map Qmap(xsize_se,ysize_se) = deltaR2./deltaR2_st ; The errors I get are : Undefined function or variable 'deltaR2_st'.
Error in MVD (line 73) Qmap(xsize_se,ysize_se) = deltaR2./deltaR2_st ;
The code is attached bellow. Can you please help me out what to do.
SE = analyze75read('10_ep2d_ge_se_128_DCE_slice8.hdr'); GE = analyze75read('10_ep2d_ge_128_DCE_slice8.hdr'); TE = 120; % echo time 120 ms [xsize_se, ysize_se, tsize_se] = size(SE); [xsize_ge, ysize_ge, tsize_ge] = size(GE);
Qmap = zeros(xsize_se, ysize_se); IM_Slice = zeros(xsize_se, ysize_se);
for x = 1:xsize_se for y = 1:ysize_se
IM_signal_SE = squeeze(SE(x,y,:)); IM_signal_SE_baseline = squeeze(SE(x,y,4:15)); Spre = mean(IM_signal_SE_baseline); Spre = double(Spre); Spost = IM_signal_SE ; % post contrast signal SE
Spost = double (Spost); deltaR2 = 1/TE .* log(Spre./Spost); endend for n = 1:xsize_ge for m = 1:ysize_ge IM_signal_GE = squeeze(GE(n,m,:)); IM_signal_GE_baseline = squeeze(GE(n,m,4:16)); Spre_star = mean(IM_signal_GE_baseline); Spost_star = IM_signal_GE ; % post contrast signal GE
Spre_star = double (Spre_star); Spost_star = double (Spost_star); deltaR2_star = 1/TE .* log(Spre_star./Spost_star); endenddelatR2_st = deltaR2_star .^(2/3); Qmap(xsize_se,ysize_se) = deltaR2./deltaR2_st ;
Best Answer