You are on page 1of 3

ASKHSH IDIOTIMES

clear all
lam=sym('lam')
A=[1,3,4,;-9,13,17;8,9,45];
B=A-lam*eye(3,3)
DD=det(B)
lysi=solve('- lam^3 + 59*lam^2 - 485*lam + 1315=0','lam')
lamda1=double(lysi(1))
lamda2=double(lysi(2))
lamda3=double(lysi(3))
% lamda1=double(2026/(9*(7265320^(1/2)/3 + 94364/27)^(1/3)) + (7265320^(1/2)/
3 + 94364/27)^(1/3) + 59/3)
% lamda2=double(59/3 - (7265320^(1/2)/3 + 94364/27)^(1/3)/2 - (3^(1/2)*i*(2026/
(9*(7265320^(1/2)/3 + 94364/27)^(1/3)) - (1/3*7265320^(1/2) + 94364/27)^(1/3)))/2
- 1013/(9*(7265320^(1/2)/3 + 94364/27)^(1/3)))
% lamda3=double((3^(1/2)*i*(2026/(9*(7265320^(1/2)/3 + 94364/27)^(1/3)) (1/3*7265320^(1/2) + 94364/27)^(1/3)))/2 - (7265320^(1/2)/3 + 94364/27)^(1/3)/2 1013/(9*(7265320^(1/2)/3 + 94364/27)^(1/3)) + 59/3)
B1=A-lamda1*eye(3,3)
%syms x y z
%X1=[x;y;z]
C1=B1(1:2,1:2)
if abs(det(C1))>10^(-13)
C2=-B1(1:2,3)
Xe1=inv(C1)
xy=-double(Xe1*[4;17])
end
C11=B1(1:2,2:3)
if abs(det(C1))>10^(-13)
C22=-B1(1:2,1)
XXe1=inv(C1)
xxy=-double(Xe1*[1-lamda1;-9])
end

EFAPTOMENH SE SPEIRA
arxh=0;
telos=4*pi;
bhma=0.001;
k=2;
x0=1;
y0=1;
deiktis=1;
for ii=arxh:bhma:telos
th(deiktis)=ii;

x(deiktis)=x0+k*th(deiktis)*cos(th(deiktis));
y(deiktis)=y0+k*th(deiktis)*sin(th(deiktis));
deiktis=deiktis+1;
end
x1=x(6);
y1=y(6);
th0=th(6);
x_par=k*cos(th(6))-k*th(6)*sin(th(6));
y_par=k*sin(th(6))+k*th(6)*cos(th(6));
mikos_par=sqrt(x_par^2+y_par^2);
x_par_monath=x_par/mikos_par;
y_par_monath=y_par/mikos_par;
lamda=[-5:0.1:5];
x_efth=x1+lamda*x_par_monath;
y_efth=y1+lamda*y_par_monath;
figure;
plot(x,y,'*r');
hold on;
axis equal;
plot(x0,y0,'r*');
plot(0,0,'r0');
plot(x1,y1,'k*');
plot(x_efth,y_efth,'.');
STROFH ELLEIPSIS
a=2;
b=1.5;
x0=4;
y0=5;
arxh=0;
telos=2*pi;
deiktis=1;
bhma=0.001;
w=pi/3
PS=[cos(w), -sin(w)
sin(w), cos(w)];
for ii=arxh:bhma:telos
th(deiktis)=ii;
x(deiktis)=x0+a*cos(th(deiktis));
y(deiktis)=y0+b*sin(th(deiktis));
B=PS*[x(deiktis);y(deiktis)];
xstr(deiktis)=B(1);
ystr(deiktis)=B(2);
deiktis=deiktis+1;
end %ii=arxh:bhma:telos
axis equal
figure,plot(x,y,'r*');
hold on
plot(xstr,ystr,'g*');

hold on

You might also like