You are on page 1of 4

%-- 12/10/11 06:12 PM --%

spline3(X);
A(:,1)=X(1,:)
A(:,2)=X(2,:)
3
RungeKutta4
A
function [A]=RungeKutta4
n=100;
a=1;
b=100;
t=1;
y=0;
h=(b-a)/n;
X(1,1)=t;
X(2,1)=y;
for i=1:n;
k1=h*sin(4*t)/t;
k2=h*sin(4*(t+h/2))/(t+h/2);
k3=h*sin(4*(t+h/2))/(t+h/2);
k4=h*sin(4*(t+h))/(t+h);
y=y+(k1+2*k2+2*k3+k4)/6;
t=a+i*h;
X(1,i+1)=t;
X(2,i+1)=y;
end
n=100;
a=1;
b=100;
t=1;
y=0;
h=(b-a)/n;
X(1,1)=t;
X(2,1)=y;
for i=1:n;
k1=h*sin(4*t)/t;
k2=h*sin(4*(t+h/2))/(t+h/2);
k3=h*sin(4*(t+h/2))/(t+h/2);
k4=h*sin(4*(t+h))/(t+h);
y=y+(k1+2*k2+2*k3+k4)/6;
t=a+i*h;
X(1,i+1)=t;
X(2,i+1)=y;
A(:,1)=X(1,:)
cls
clear
clw
help
clr
clear
delete
cls
s
>>runge_kutta( vdp ,[1 1],10,0.01)
runge_kutta( vdp ,[1 1],10,0.01)
>>RungeKutta4( vdp ,[1 1],10,0.01)
runge_kutta( vdp ,[1 1],10,0.01)
runge_kutta([1 1],10,0.01)
runge_kutta('x^2',0.1,1.2,3)
runge_kutta('x^2',2,3,0.1)

runge_kutta('x + asin(x)',0.1,1,1.4,1.5)
y
clc
clear all
runge_kutta('x + asin(x)',0.1,1,1.4,1.5)
runge_kutta('x + asin(x)',[1 1],10,0.01)
runge_kutta('x + sin(x)',[1 1],10,0.01)
runge_kutta('sin(x)',[1 1],10,0.01)
runge_kutta('x',[1 1],10,0.01)
runge_kutta('x + asin(x)',[1 1],10,0.01)
help
runge_kutta('x + asin(x)',[1 1],10,0.01)
ode23
help ode23
%-- 13/10/11 03:37 PM --%
[T,Y]=runge_kutta('(3*x +5*y)/y',2,1,0.1)
[m,r]=euler_aprox('(3*x +5*y)/y',0.5,2,1,1.5)
[m,r]=euler_aprox('(3 x +5 y)/y',0.5,2,1,1.5)
[m,r]=euler_aprox('(3x +5y)/y',0.5,2,1,1.5)
[m,r]=euler_aprox('(3x+5y)/y',0.5,2,1,1.5)
[m,r]=euler_aprox('(3*x/y) +5',0.5,2,1,1.5)
[m,r]=euler_aprox('(3*x +5*y)/y',0.5,2,1,1.5)
[R]=rk4('(3*x +5*y)/y',1,1.5,2,0.1)
[R]=rk4('(3*x +5*y)/y',1.5,1,2,0.1)
[R]=rk4('(3*x +5*y)/y',1,1.5,2,0.1)
[R]=rk4('(3*x +5*y)/y',1,1.5,2,5)
[R]=rk4('(3*x +5*y)/y',1,1.5,2,0.1)
[T,Y] = rk4('(3*x +5*y)/y',1,1.5,2,0.1)
[T,Y] = rk4('(3*x/y)+5',1,1.5,2,1)
[T,Y] = rk4('(3*x / y) + 5 ',1,1.5,2,1)
[T,Y] = rk4('(3*x+ 5*y)/y ',1,1.5,2,1)
[T,Y] = rk4('(3*x+ 5*y)/y ',1,1.5,2,100)
[X,Y] = rk4('(3*x+ 5*y)/y ',1,1.5,2,100)
function [X,Y] = rk4('3*x+5*y /y',1,1.5,2,1)
u = rk4(0.5,0.5,1,1.5)
[X,Y] = rk4('(3*x+5*y)/y',1,1.5,2,5)
[X,Y] = rk4('(3*x+5*y)/y',1,1.5,2,1)
[T,Y] = rk4('4*exp(0.8*x)-0.5*y',0,0.5,2,5)
%-- 15/10/11 10:39 PM --%
r_k('(3*x+5*y)/y',0.1,1,2,1.5)
clc
r_k('(3*x+5*y)/y',0.1,1,2,1.5)
%-- 16/10/11 10:26 PM --%
help margin
bode(tf([105 735],[1 8 750]))
bode(tf([735],[1 8 735]))
%-- 17/10/11 12:09 PM --%
bode(tf([735],[1 8 15]))
num=[105 735]
den=[1 8 750]
pzmap =[num den]
pzmap (num den)
printsys(num den)
printsys(num,den)
pzmap (num,den)
bode(tf([735],[1 8 15]))
[mag,fase]=bode((tf([735],[1 8 753])),15.3)
[mag,fase]=bode((tf([735],[1 8 753])),3)
sys=tf(num,den)
num=[735]

den=[1 8 15]
sys
sys=tf(num,den)
bode(sys)
margin(sys)
num=[105 735]
den=[1 8 750]
rlocus(num,den)
funcion = tf(num,den)
rlocus(funcion)
locus(funcion)
rlocus(funcion)
pzmap (num den)
pzmap (num,den)
rlocus(funcion)
sys
funcion
bode(sys,funcion)
bode(sys)
margin(sys)
sys
funcion=tf([735 5880 5145],[1 15 5216 5250])
funcion
num = [735 5880 5145]
den=[1 15 5216 5250]
pzmap (num,den)
sys
sys =tf([5145 5145],[1 15 71 105])
sys
margin (sys)
r_k('(3*x+5*y)/y',0.1,1,2,1.5)
[T,Y] = rk4('4*exp(0.8*x)-0.5*y',0,0.5,2,5)
r_k('(3*x+5*y)/y',0.1,1,2,1.5)
%-- 18/10/11 08:11 PM --%
margin (sys)
sys =tf([5145 5145],[1 15 71 105])
margin (sys)
bode (sys)
margin(sys)
%-- 18/10/11 11:36 PM --%
pzmap((90*(s^2+17*s+70))/((7*(s^3))+(105*(s^2))+(932*s)+4200))
s=tf('s')
pzmap((90*(s^2+17*s+70))/((7*(s^3))+(105*(s^2))+(932*s)+4200))
%-- 20/11/11 11:34 AM --%
I = imread('pout.tif');
imshow(I)
whos
figure, imhist(I)
I2 = histeq(I);
figure, imshow(I2)
figure, imhist(I2)
imshow(I)
figure, imshow(I2)
imwrite (I2, 'pout2.png');imwrite (I2, 'pout2.png');
imfinfo('pout2.png')
imfinfo('pout.tif')
%-- 18/01/12 08:04 AM --%
I2 = histeq(I);
I = imread('pout.tif');
whos

figure, imhist(I)
clc
t=0:0.001:0.625
clc
t=0:0.001:0.625
clc
t=0:0.001:0.625;
ft=3*cos(2*pi*10*t)-2*sin(2*pi*15*t)+sin(2*pi*25*t);
plot(t,ft)
plot(ft)
plot(t,ft)
plot(ft)
t=0:0.1:0.625;
plot(t,ft)
ft=3*cos(2*pi*10*t)-2*sin(2*pi*15*t)+sin(2*pi*25*t);
plot(t,ft)
t=0:0.001:0.625;
ft=3*cos(2*pi*10*t)-2*sin(2*pi*15*t)+sin(2*pi*25*t);
plot(t,ft)
t=0:0.051:0.625;
ft=3*cos(2*pi*10*t)-2*sin(2*pi*15*t)+sin(2*pi*25*t);
plot(t,ft)
n=0:59:
n=0:59;
fn=3*cos(2*pi*n*1/10)-2*sin(2*pi*3/20*n)+sin(2*pi*n*1/4);
plot(n,ft)
plot(n,fn)
ste
stem(n,fn)
clc

You might also like