Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

clear all

clc
syms x
I=dicomread('tugas4.dcm');
[row, col]=find(ismember(I, max(I(:))));
max_num=max(I(:));
cut=I(69:81,67:79);
Col=sum(cut);
Row=sum(cut,2);
maxx = max(Col,3);
locx = find(ismember(Col,maxx(:)));
maxy = (max(Row,3));
locy = find(ismember(Row,maxy(:)));

fit_x = fit(locx(:),maxx(:),'poly2');
fit_y = fit(locy(:),maxy(:),'poly2');

eqx = -1.675e+04*x.^2 + 2.147e+05*x + -5.249e+05;


eqy = -9808*x.^2 + 1.212e+05*x + -2.132e+05;

deqx(x) = diff(eqx)
deqy(x) = diff(eqy)

solx = deqx(maxx)
soly = deqy(maxy)

You might also like