how to correct this error?

4 Ansichten (letzte 30 Tage)
vinay pratap srivastava
vinay pratap srivastava am 30 Jul. 2018
Kommentiert: madhan ravi am 30 Jul. 2018
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.

Akzeptierte Antwort

madhan ravi
madhan ravi am 30 Jul. 2018
Bearbeitet: madhan ravi am 30 Jul. 2018
Hi use .* and ./ instead of * and / .
argument2 = (1:Nx).*Ndist.*D./fs.*c./2.*1000;
NOTE: YOU DIDNT DEFINE FEW PARAMETERS
  2 Kommentare
vinay pratap srivastava
vinay pratap srivastava am 30 Jul. 2018
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 am 30 Jul. 2018
SURE

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by