我已经获得了10帧径向k空间数据,每帧有12个辐条。每个轮辐我也有一系列角度。 kx的大小为120.我想1)绘制辐条,2)将辐条分配回相应的帧。我该如何安排矩阵?我的MATLAB代码是
for s=1:(12*10) %total number of spokes
ky = tan(deg2rad(angles[i,1]))*kx; %generate the spokes with corresponding angles
k_space(kx,ky,frame) = raw_data(kx,s); %assign the data to the spoke
if (i/12)==fix(i/12) %change to the next frame when 12 spokes arrive one frame
frame=frame+1;
end
end
错误消息是
Subscript indices must either be real positive integers or logicals.
我理解错误的出现是因为ky必须是整数作为3D矩阵k_space(kx,ky,frame)
的维度。我该如何纠正这个矩阵维度?
谢谢。