# Matlab Final result image error

Status
Not open for further replies.

#### JuveGodot

##### Newbie level 1 i have this code that i have any image as an input here it is called 1.png and then i make it go through for loops of an equation, everything works fine and i have a final image, still this final image appears in half, as a triangle.. here is the code for whoever would like to help me. just input any image to get the result.
PS: the final image my look similar to the input image. thanks a lot for your help.

clear all
close all

n = 180;
m = 180;
c = 180;
d = 180;
N = 40;

theta = 0:180;
imshow (I,[])
figure
imshow(R,[],'Xdata',theta,'Ydata',xp,'InitialMagnification','fit')
xlabel('\theta (degrees)')
ylabel('x''')

Q=imresize(R, [412 412]);
g=imresize(Q, [180 180]);

A=ones(c,d);
F=imresize(H, [412 412]);
figure
imshow(F,[])
f=imresize(F, [180 180]);
for k = 1:N;

for j = 1:n
T = sum(A ,j));

C = zeros(m,n);
for l = 1:m
C(l, = f ,l,k)';
end

V = T*C;

X = ones(180,180);
for i = 1:n-1
X(i+1, = X(i, + (A(i,j).*(g(i, )./V(i, );
end
f ,j,k+1) = (f ,j,k).*X ,j))./T;
end

end
figure
imshow(f ,:,k+1),[])

Status
Not open for further replies.