how to correct this error?

조회 수: 4 (최근 30일)
vinay pratap srivastava
vinay pratap srivastava 2018년 7월 30일
댓글: madhan ravi 2018년 7월 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
vinay pratap srivastava 2018년 7월 30일
yah i forget to add D,fs,c,Ndist. I will edit as you mentioned & check if it work or not. thanks
madhan ravi
madhan ravi 2018년 7월 30일
SURE

댓글을 달려면 로그인하십시오.

추가 답변 (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