how to correct this error?

6 次查看(过去 30 天)
Error using *
Inner matrix dimensions must agree.
Error in interger_converting (line 58)
argument2 = (1:Nx)*Ndist*D/fs*c/2*1000;
Here is the code.
A = transpose(scale_temp_vdata_i);
B = transpose(scale_temp_vdata_q);
new_idata = reshape(A,[],1);
new_qdata = reshape(B,[],1);
C = transpose(temp_scale_auto_real);
D = transpose(temp_scale_auto_imag);
new_auto_real = reshape(C,[],1);
new_auto_imag = reshape(D,[],1);
for y = 1:x
arctan_data(y,1) = atan2 (new_auto_imag(y,1),new_auto_real(y,1));
end
new_signed = reshape(arctan_data,[],108);
scale_v_est = transpose(new_signed);
%Imaging
[Nx,Ny]=size(scale_v_est);
argument1 = ((0:Ny-1)-Ny/2)*dy*1000;
argument2 = (1:Nx)*Ndist*D/fs*c/2*1000;
imagesc(argument1,argument2,-scale_v_est)
map=[1:64; zeros(2,64)]/64;
colormap(map')
colorbar
ylabel('Depth in tissue [mm]')
xlabel('Lateral distance [mm]')
drawnow
% Make an interpolated image
ID=100;
[n,m]=size(scale_v_est);
scale_new_est1=zeros(n,m*ID);
for i=1:n
I;
scale_new_est1(i,:)=abs(interp(scale_v_est(i,:),ID));
end
[n,m]=size(scale_new_est1);
new_est=zeros(n*5,m);
Ndist=Ndist/5;
for i=1:m
i;
scale_new_est(:,i)=abs(interp(scale_new_est1(:,i),5));
end
[Nx,Ny]=size(scale_new_est);
scale_new_est=scale_new_est/max(max(scale_new_est))*64;
imagesc(((0:Ny-1)-Ny/2)*dy/ID*1000,(1:Nx)*Ndist*D/fs*c/2*1000,scale_new_est)
map=[1:64; zeros(2,64)]/64;
colormap(map')
colorbar
ylabel('Depth in tissue [mm]')
xlabel('Lateral distance [mm]')
axis('image')
here scale_temp_vdata_i, scale_temp_vdata_q, temp_scale_auto_real, temp_scale_auto_imag are .mat file. I'm attaching those files.
Hope i got answer soon.

采纳的回答

madhan ravi
madhan ravi 2018-7-30
编辑:madhan ravi 2018-7-30
Hi use .* and ./ instead of * and / .
argument2 = (1:Nx).*Ndist.*D./fs.*c./2.*1000;
NOTE: YOU DIDNT DEFINE FEW PARAMETERS
  2 个评论
vinay pratap srivastava
yah i forget to add D,fs,c,Ndist. I will edit as you mentioned & check if it work or not. thanks

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by