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 Center および File ExchangeImage Processing Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by