You are on page 1of 26

%-- 02/04/12 23:30 --%

guide
%-- 06/04/12 10:15 --%
clc
%-- 08/04/12 0:33 --%
edit
clear
%-- 08/04/12 12:12 --%
%-- 08/04/12 18:04 --%
%-- 08/04/12 18:59 --%
clc
%-- 08/04/12 19:08 --%
guide
clc
guide
CLC
clc
guide
%-- 08/04/12 20:22 --%
Vi=(0.94:0.01:0.8)
Vi=[0.94:0.01:0.8]
Vi=(0,94:0,01:0,8)
Vi=(0.8:0.01:0.94)
exp1
exp(1)
exp(0.1*(1-Vi))
clc

clear
clc
edit
clc
clear
clc
help call function
help function
clc
help switch
clc
clear
clc
guide
clc
guide
%-- 08/04/12 22:51 --%
guide
CLC
clc
clear
clc
guide
%-- 09/04/12 19:27 --%
guide
%-- 11/04/12 15:24 --%
clear

clc
%-- 11/04/12 16:09 --%
lokasi=rand(1:1:33)
lokasi=[1:1:33]
help rand
clear
clc
rand(2,1)
rand(5,1)
rand(10,4)
fix(2*rand(UkPop,JumGen));
fix(2*rand(10,4))
%-- 11/04/12 23:32 --%
x=in(:,1)
x=(:,1)
clear
clc
out = pso_Trelea_vectorized('f6',2)
help in
%-- 12/04/12 1:19 --%
clear; clc;
%-- 12/04/12 13:45 --%
rand(5,5)
randn(5,5)
randint(5,5)
randi(5,5)
randi(5)

randi(1,5)
randi(23,1,10)
a=randi(23,1,5)
b=randi(23,1,5)
c=randi(23,1,5)
c=randi(23,5,5)
c=randi(23,1,5)
randint(5,25)
bin2dec(ans)
bin2dec('ans')
%-- 12/04/12 14:59 --%
A=[1 2 3 4];
B=[10 11 12 13; 14 15 16 17; 18 19 20 21; 22 23 24 25];
A=
A=[1 2 3 4]
B=[10 11 12 13; 14 15 16 17; 18 19 20 21; 22 23 24 25]
inv(B)
help invers
C=inv(B)*A
C=inv(B).*A
inv[B]
inv(B)
clear
clc
A=[-0.2 -0.6 -0.017]
clear
clc

A=[-0.2; -0.6; -0.017]


B=[9.333 -4.08 0; -4.08 10.95 0; 0 0 10.38]
inv(B)
C=inv(B).*A
C=inv(B)*A
clear
X=[-0.63;-0.1;-0.367;1.9]
Y=[37.402 -40.798 -3.396 0.033; -40,798 92.298 0 0; -3.396 0 72.066 -0.033; 0.033 0 -0.033 67.301]
EDIT
%-- 12/04/12 21:51 --%
help rand
rand(100,1)
clc
rand(10)
clc
a=2; b=5;
r = a + (b-a).*rand(100,1)
clc
a=rand(2,5)
fix(a)
ceil(a)
floor(a)
clc
a=[0.4, 1.8, 2.1, 3.9, 4.99, 5.03]
fix(a)
fix(2*a)
ceil(a)

floor(a)
round(a)
clc
rand(10,'double')
clc
rand(5.'double')
rand(5,'double')
rand(5,'single')
rand()
clc
a=2; b=5;
r=a+(b-a).*rand(23,1)
clc
a=2; b=5;r=a+(b-a).*rand(23,1)
clc
a=2; b=5;
r=a+(b-a).*rand(5,1)
r
r=a+(b-a).*rand(10,1)
rand(2,3)
clc
a=1; b=23;
rand(10,1)
clc
a=1; b=23;
r=round(a+(b-a).*rand(5,5))
distributed.rand(3)

rand('state',5)
condest(4)
condest(4,6)
clc
n=4;
S = spalloc(n,n,3*n);
for j = 1:n
S(:,j) = [zeros(n-3,1)' round(rand(3,1))']';end
spalloc(n,n,3*n)
j=1:4
S(:,j)
[zeros(n-3,1)' round(rand(3,1))']'
clc
spalloc(3,2,10)
r = 1 + 2.*randn(100,1)
clc
r = 1 + 2.*randn(5,4)
round(1+(23-1).*r)
clc
randperm(23)
randperm(5,23)
1+(23-1).*rand(5)
round(1+(23-1).*rand(5))
round(1+(23-1).*rand(3))
round(1+(23-1).*rand(10,3))
round(1+(23-1).*rand(50,3))
clc

round(1+(23-1).*randpermut(5))
round(1+(23-1).*randperm(5))
(1+(23-1).*randperm(5))
randperm(5))
randperm(5)
rand(5,randperm(3))
randper(3)
randperm(3)
clc
rand(1:1:23)
rand(1,1,23)
clc
r=1+(23-1).*randi(5)
r=1+(23-1).*rand(5)
randi(5,5)
clc
r=1+(23-1).*randi(5,5)
randper(5,5)
randperm(5,5)
randperm(s,6)
randperm(23,3)
randperm(1,3)
clc
randn(2,5)
round(randn(2,5))
clc
r=(23-(rand(5)*(23-1)))

round(r)
clc
r=(23-(rand(5)*(23-1)))
clc
r=(23-(rand(3,10)*(23-1)))
round(r)
clc
r=round(23-(rand(10,3)*(23-1)))
r=round(23-(rand(50,3)*(23-1)))
r=round(23-(rand(50,3)*(23-1)))clc
clc
n=10;m=3;
r=randperm(n)
r=r(1:m)
a=[1:23];
select = unique(round(rand(margins,1)*23+1))
select = unique(round(rand(margin,1)*23+1))
clc
\clc
clc
x=mod(randperm(5),8)
r = ceil(rand(1,3).*(n-2:n));
n=2
r = ceil(rand(1,3).*(n-2:n)
clc
n = 10;
m = 3;

r = randperm (n);
r = r (1: m)
r = r (10: m)
a= r (10:m)
clc
r = r (1: m)
clc
n = 10;
m = 3;
r = randperm (n);
r = r (1: m)
n = 10;
m = 3;
r = randperm (n);
r = r (1: m)
clc
n = 10;
m = 3;
r = randperm (n);
r = r (1: m)
r
clc
i1 = ceil(n*rand);
i2 = ceil((n-1)*rand);
i3 = ceil((n-2)*rand);
if i2<i1
i3 = I3 + (I3>= i2) + (I3>= i1-1);

else
i2 = i2 + 1;
i3 = I3 + (I3>= i1) + (I3>= i2-1);
end
i1 = ceil(n*rand);
i2 = ceil((n-1)*rand);
i3 = ceil((n-2)*rand);
if i2<i1
i3 = I3 + (I3>= i2) + (I3>= i1-1);
else
i2 = i2 + 1;
i3 = i3 + (i3>= i1) + (i3>= i2-1);
end
clc
n=5;
r = ceil(rand(1,3).*(n-2:n))
n=5;
r = ceil(rand(1,3).*(n-2:n))
n=5;
r = ceil(rand(5,5).*(n-2:n))
clc
n=5;
r = ceil(rand(1,5).*(n-2:n))
n=5;
r = ceil(rand(5,3).*(n-2:n))
clear
clc

n=5;
r = ceil(rand(5,3).*(n-2:n))
n=5;
r = ceil(rand(1,3).*(n-2:n))
n=5;
r = ceil(rand(1,3).*(n-2:n))
%-- 15/04/12 21:36 --%
1/(0.042+j*0.168)
1/(0.031+j*0.126)
1/(0.084+j*0.336)
1/(0.053+j*0.21)
1/(0.063+j*0.252)
-(1.4-j*5.6)
-1.84+j*7.48-0.7+j*2.8-1.13+j*4.48
-1.84+j*7.48-1.13+j*4.48-0.93+j*3.73
polar(1.4,-j*5.6)
p=0.042+j*0.168
pol(p)
polar(p)
clea
clear
clc
help rectangular
help polar
clc
sqrt(9)
clc

clear;clc
sqrt(1.4^2+5.6^2)
acos(60)
acos(0.5)
acosd(0.5)
asind(1)
atand(1)
atand(-5.6/1.4)
5.7723*cos(-75.9638)-5.7723*j*sin(-75.9638)
5.7723*cos(-75.9638)+5.7723*j*sin(-75.9638)
atand(5.6/1.4)
5.7723*cos(75.9638)+j*5.7723*sin(75.9638)
atan(1.4-j*5.6)
cos(30)
cos(60)
cosd(60)
5.7723*cosd(-75.9638)+5.7723*j*sind(-75.9638)
sqrt(1.4^2+5.6^2)
atand(5.6/-1.4)
sqrt(-1.84^2+7.48^2)
atand(7.48/-1.84)
sqrt(-0.7^2+7.48^2)
atand(7.48/-0.7)
sqrt(-1.13^2+4.48^2)
atand(4.48/-1.13)
sqrt(-0.93^2+3.73^2)
atand(3.73/-0.93)

sqrt(3.24^2+13.08^2)
atand(-13.08/3.24)
sqrt(3.67^2+14.76^2)
atand(14.76/-3.67)
sqrt(1.63^2+6.53^2)
atand(6.53/-1.63)
sqrt(3.9^2+15.69^2)
atand(15.69/-3.9)
clc
1.02*7.25
1.02^2
1.02*1.02*15.21
1.02*7.45
1.02*4.34
7.4*cosd(76.2)+15.82*cosd(76)+7.6*cos(84.7)+4.43*cos(75.8)
7.4*sind(76.2)+15.82*sind(76)+7.6*sind(84.7)+4.43*sind(75.8)
7.4*cosd(76.2)+15.82*cosd(76)+7.6*cosd(84.7)+4.43*cosd(75.8)
1.02*5.77
1.02*7.25
5.89*cosd(76)+7.4*cos(76.2)
5.89*cosd(76)+7.4*cosd(76.2)
5.89*sind(76)+7.4*sind(76.2)
5.89*cosd(76)+7.4*cosd(76.2)+13.48*cosd(76)
5.89*sind(76)+7.4*sind(76.2)+13.48*sind(76)
clc
1.02*7.45
7.6*cosd(84.7)+3.61*cosd(76)+6.73*cosd(76)

7.6*sind(84.7)+3.61*sind(76)+6.73*sind(76)
1.02*7.25
7.4*cosd(76.2)+4.34*cosd(75.8)+3.61*cosd(76)+16.16*cosd(76)
7.4*sind(76.2)+4.34*sind(75.8)+3.61*sind(76)+16.16*sind(76)
-5.89*sind(76)-7.4*sind(76.2)
7.4*sind(76.2)
15.82*sind(76)
-7.4*sind(76.2)-7.6*sind(84.7)-4.43*sind(75.8)
-7.4*sind(76.2)
-7.6*sind(84.7)
-4.43*sind(75.8)
7.6*sind(84.7)+3.61*sind(76)+6.73*sind(76);
7.6*sind(84.7)
-7.6*sind(84.7)-3.61*sind(76)
3.61*sind(76)
7.4*sind(76.2)+4.34*sind(75.8)+3.61*sind(76)+16.16*sind(76);
4.34*sind(75.8)
3.61*sind(76)
-7.4*sind(76.2)-4.34*sind(75.8)-3.61*sind(76)
%-- 16/04/12 11:58 --%
a=1; b=23;
r=a+(b-a).*rand(5,5)
z=ceil(r)
randperm(z)
clc
x = rand(N,dim)*(upbnd-lwbnd) + lwbnd
N=3; dim=2;

n=10;m=3;
r=randperm(n)
r=r(1:m)
n=10;m=3;
r=randperm(n)
r=r(1:m)
n=10;m=3;
r=randperm(n)
r=r(1:m)
n=10;m=3;
r=randperm(n)
r=r(1:m)
n=10;m=3;
r=randperm(n)
r=r(1:m)
n=10;m=3;
r=randperm(n)
r=r(1:m)
n=10;m=3;
r=randperm(n)
r=r(1:m)
n=10;m=3;
r=randperm(n)
r=r(1:m)
n=10;m=3;
r=randperm(n)
r=r(1:m)

n=10;m=3;
r=randperm(n)
r=r(1:m)
clc
n=10;m=3;
r=randperm(n);
r=r(1:m);
n=23;m=3;
r=randperm(n);
r=r(1:m)
r
lokasi=[r,5]
z=[r;5]
q=[10,5]
w=[r,r]
clear
clc
clear
clc
rating=rand(-1,1)
rand(1)
rand(5,5)
a=-1;b=1;r = a + (b-a).*rand(5,5)
format short
r
format long
r

format short
r
clc
clear
clc
a=rand(5)
prod(a)
clc
a=magic(4)
prod(a)
prod(a,2)
clear;clc;
m=1.09;n=0.92;
r=m+(m-n).*rand(1,23)
clc
clear;clc
m=1.09;n=0.92;
r=n+(m-n).*rand(1,23)
clear
clc
exp(3)
exp(1)
|1-r|
a=[-1 2 3 4 5 -9 10 -10]
b=abs(a)
clear
clc

v=exp(0.1*abs(1-r))
clear;clc
r=n+(m-n).*rand(1,5)
if r>=0.95 & r<=1.05
v=1
else
v=exp(0.1*abs(1-r))
end
r=0.92+(1.09-0.92).*rand(1,5)
if r>=0.95 & r<=1.05
v=1
else
v=exp(0.1*abs(1-r))
end
r=n+(m-n).*rand(1,5)
if r>=0.95 & r<=1.05
v=1
else
v=exp(0.1*abs(1-r))
end
r=0.92+(1.09-0.92).*rand(1,5)
if r>=0.95 & r<=1.05
v=1
else
v=exp(0.1*abs(1-r))
end
clear

clc
r=0.92+(1.09-0.92).*rand(1,5)
if r>=0.95 & r<=1.05
v=1
else
v=0
r=0.92+(1.09-0.92).*rand(1,5)
if r>=0.95 & r<=1.05
v=1;
else
v=0;
end
clear
clc
%-- 16/04/12 14:34 --%
clc
%-- 16/04/12 14:54 --%
clc
%-- 16/04/12 19:11 --%
1.02*5.77
1.02*7.25
2*13.48
5.89*cosd(76)+7.4*cosd(76.2)+26.96*cosd(76)
7.4*cosd(76.2)
7.4*cosd(76.2)+15.82*cosd(76)+7.6*cos(84.7)+4.43*cos(75.8);
7.6*cos(84.7)
7.4*cosd(76.2)+15.82*cosd(76)+7.6*cosd(84.7)+4.43*cosd(75.8);

7.6*cosd(84.7)
7.6*cosd(84.7)+2*15.21*cosd(75.8)
4.43*cosd(75.8)
7.6*cosd(84.7)+3.61*cosd(76)+6.73*cosd(76);
7.45*cosd(84.7)
7.6*cosd(84.7)+3.61*cosd(76)+2*6.73*cosd(76)
3.61*cosd(76)
7.4*cosd(76.2)+4.34*cosd(75.8)+3.61*cosd(76)+16.16*cosd(76);
3.61*cosd(76.2)
7.4*cosd(76.2)+4.34*cosd(75.8)+3.61*cosd(76)+2*16.16*cosd(76)
5.89*sind(76)+7.4*sind(76.2)
7.4*sind(76.2)
7.6*cosd(84.7)
7.6*cosd(84.7)+3.61*cosd(76)
6.73*cosd(76)
4.34*cosd(75.8)
3.61*cosd(76)
7.4*cosd(76.2)+4.34*cosd(75.8)+3.61*cosd(76)
5.89*sind(76)+7.4*sind(76.2)+13.48*sind(76);
5.89*sind(76)+7.25*sind(76.2)+2*13.48*sind(76)
7.6*sind(84.7)+3.61*sind(76)+6.73*sind(76);
7.6*sind(84.7)+3.61*sind(76)+2*6.73*sind(76)
3.61*sind(76)
7.4*sind(76.2)+4.34*sind(75.8)+3.61*sind(76)+16.16*sind(76);
3.61*sind(76)
7.4*sind(76.2)+4.34*sind(75.8)+3.61*sind(76)+2*16.16*sind(76)
115-6.45

clear;clc
A=[108.55; 62.62; 66.8; 77.39; 34.02; 12.4; 9.43]
B=[-12.9 7.19 0 0 9.71 0 0 0; 7.19 -19.05 -7.58 -4.29 1.77 0 8.17 1.09; 0 7.57 -11.07 3.5 0 0.69 4.83
0.87; 0 4.2 3.5 -14.89 0 0 0.86 11.52; 12.9 -7.19 0 0 38.92 0 0 0; 0 -0.7 1.58 -1.63 0 0 24.13 3.5; 0 1.06 -0.87 3.7 0 0 3.5 46.26]
C=inv(B)*A
E=[108.55; 62.62; 66.8; 77.39; 34.02; 0; 12.4; 9.43];
F=[-12.9 7.19 0 0 9.71 0 0 0; 7.19 -19.05 -7.58 -4.29 1.77 0 8.17 1.09; 0 7.57 -11.07 3.5 0 0.69 4.83
0.87; 0 4.2 3.5 -14.89 0 0 0.86 11.52; 12.9 -7.19 0 0 38.92 0 0 0; 0 0 0 0 0 0 0 0; 0 -0.7 1.58 -1.63 0 0
24.13 3.5; 0 -1.06 -0.87 3.7 0 0 3.5 46.26];
G=inv(F)*E
X=[108.55; 62.62; 66.8; 77.39; 34.02; 0; 12.4; 9.43]
Y=[-12.9 7.19 0 0 9.71 0 0 0; 7.19 -19.05 -7.58 -4.29 1.77 0 8.17 1.09; 0 7.57 -11.07 3.5 0 0.69 4.83
0.87; 0 4.2 3.5 -14.89 0 0 0.86 11.52; 12.9 -7.19 0 0 38.92 0 0 0; 0 0 0 0 0 0 0 0; 0 -0.7 1.58 -1.63 0 0
24.13 3.5; 0 -1.06 -0.87 3.7 0 0 3.5 46.26]
Z=inv(Y)*X
clear;clc
X=[108.55; 62.62; 66.8; 77.39; 34.02; 0; 12.4; 9.43]
Y=[-12.9 7.19 0 0 9.71 0 0 0; 7.19 -19.05 -7.58 -4.29 1.77 0 8.17 1.09; 0 7.57 -11.07 3.5 0 0.69 4.83
0.87; 0 4.2 3.5 -14.89 0 0 0.86 11.52; 12.9 -7.19 0 0 38.92 0 0 0; 0 0 0 0 0 0 0 0; 0 -0.7 1.58 -1.63 0 0
24.13 3.5; 0 -1.06 -0.87 3.7 0 0 3.5 46.26]
Z=inv(Y).*X
Z=inv(Y)*X
inv(Y)
X\Y
X/Y
X.\Y
clear;clc
-0.051/3.14*180
-0.051/(22/7)*180
a=(22/7);b=180;

-0.0186*b/a
0.0056*b/a
-0.0338*b/a
0.0903*b/a

%-- 16/04/12 19:11 --%


1.02*7.25
-0.32-1.06+76.2
7.6*1.0447
-0.32-1.94+84.7
4.43*1.0543
-0.32+5.17+75.8
7.4*cosd(74.82)+15.82*cosd(76)+7.94*cosd(82.44)+4.67*cosd(80.65)
7.4*sind(74.82)+15.82*sind(76)+7.94*sind(82.44)+4.67*sind(80.65)
5.89*1.0017
1.06+76
7.4*1.0017
1.06+0.32+76.2
13.48*1.0017^2
5.9*cosd(77.06)+7.41*cosd(77.58)+13.53*cosd(76)
5.9*sind(77.06)+7.41*sind(77.58)+13.53*sind(76)
7.6*1.0447
1.94+0.32+84.7
3.61*1.0447*1.0543
1.94+5.17+76
6.73*1.0447^2

7.94*cosd(87)+3.98*cosd(83.11)+7.35*cosd(76)
7.94*sind(87)+3.98*sind(83.11)+7.35*sind(76)
7.6*1.0543
7.4*1.0543
-5.17+76.2
4.34*1.0543
-5.17+0.32+75.8
3.61*1.0543*1.0447
-5.17-1.94+76
16.16*1.0543^2
7.8*cosd(71.03)+4.58*cosd(70.95)+3.98*cosd(68.89)+17.96*cosd(76)
7.8*sind(71.03)+4.58*sind(70.95)+3.98*sind(68.89)+17.96*sind(76)
-5.9*sind(77.06)-7.41*sind(77.58)
(-5.9*cosd(77.06)-7.41*cosd(77.58))*-1
5.9*cosd(77.06)+7.41*cosd(77.58)
7.41*sind(77.58)
-7.41*cosd(77.58)
7.4*sind(74.82)+15.82*sind(76)+7.94*sind(82.44)+4.67*sind(80.65);
7.4*sind(74.82)
(7.4*sind(74.82)+7.94*sind(82.44))*-1
-7.94*sind(82.44)
-4.67*sind(80.65)
7.94*sind(87)+3.98*sind(83.11)+7.35*sind(76);
7.94*sind(87)
-7.94*cosd(87)
(7.94*sind(87)+3.98*sind(83.11))*-1
7.94*cosd(87)+3.98*cosd(83.11)

3.98*sind(83.11)
-3.98*cosd(83.11)
7.8*sind(71.03)+4.58*sind(70.95)+3.98*sind(68.89)+17.96*sind(76);
4.58*sind(70.95)
3.98*sind(68.89)
-4.58*cosd(70.95)
-3.98*cosd(68.89)
(7.8*sind(71.03)+4.58*sind(70.95))*-1
(7.8*sind(71.03)+4.58*sind(70.95)+3.98*sind(68.89))*-1
7.8*cosd(71.03)+4.58*cosd(70.95)+3.98*cosd(68.89)
5.9*cosd(77.06)+7.41*cosd(77.58)+13.53*cosd(76);
5.89*cosd(77.06)+7.4*cosd(77.58)+2*1.0017*13.48*cosd(76)
5.89*sind(77.06)+7.4*sind(77.58)+2*1.0017*13.48*sind(76)
7.4*cosd(74.82)+15.82*cosd(76)+7.94*cosd(82.44)+4.67*cosd(80.65);
7.4*cosd(74.82)
7.6*cosd(82.44)+4.43*cosd(76)
7.6*cosd(82.44)+2*1.02*15.21*cosd(76)
4.43*cosd(80.65)
7.94*cosd(87)+3.98*cosd(83.11)+7.35*cosd(76);
1.0447*7.45*cosd(87)
7.6*cosd(87)+1.0543*3.61*cosd(83.11)+2*1.0447*6.73*cosd(76)
7.6*sind(87)+1.0543*3.61*sind(83.11)+2*1.0447*6.73*sind(76)
1.0447*3.61*cosd(83.11)
1.0447*3.61*sind(83.11)
7.8*cosd(71.03)+4.58*cosd(70.95)+3.98*cosd(68.89)+17.96*cosd(76);
3.98*cosd(68.89)/1.0447
3.98*sind(68.89)/1.0447

7.8*cosd(71.03)/1.0543+4.58*cosd(70.95)/1.0543+3.98*cosd(68.89)/1.0543+2*1.0543*16.16*cosd(
76)
7.8*sind(71.03)/1.0543+4.58*sind(70.95)/1.0543+3.98*sind(68.89)/1.0543+2*1.0543*16.16*sind(7
6)

You might also like