۰۵-مهر-۱۳۸۸, ۰۹:۳۳:۲۳
(۰۵-مهر-۱۳۸۸, ۰۱:۱۱:۴۷)aminsotudeh نوشته است: [ -> ]من فقط می خواستم بدونم متلب چقدر تو این سایت طرفدار داره که ظاهرا فقط یک نفر هست.شما به این فکر کن که ذکوة علم نشر ان است
طالباش یواش یواش از طریق گوگل پیدا میشن
(۰۵-مهر-۱۳۸۸, ۰۱:۱۱:۴۷)aminsotudeh نوشته است: [ -> ]من فقط می خواستم بدونم متلب چقدر تو این سایت طرفدار داره که ظاهرا فقط یک نفر هست.شما به این فکر کن که ذکوة علم نشر ان است
delete task1.txt
diary task1.txt
% Display the command lines in the command window
echo on
% Remove old variable definitions
clear all
% Remove old graphics windows
close all
num1=[2 5 3 6];
den1=[1 6 11 6];
[r,p,k]=residue(num1,den1)
[num1,den1]=residue(r,p,k)
printsys(num1,den1,'s')
%for second example press a key
pause
num2=[1 2 3];
den2=[1 3 3 1];
[r,p,k]=residue(num2,den2)
[num2,den2]=residue(r,p,k)
printsys(num2,den2,'s')
echo off
diary off
% Remove old variable definitions
clear all
% Remove old graphics windows
close all
num1=[2 5 3 6];
den1=[1 6 11 6];
[r,p,k]=residue(num1,den1)
r =
-6.0000
-4.0000
3.0000
p =
-3.0000
-2.0000
-1.0000
k =
2
[num1,den1]=residue(r,p,k)
num1 =
2.0000 5.0000 3.0000 6.0000
den1 =
1.0000 6.0000 11.0000 6.0000
printsys(num1,den1,'s')
num/den =
2 s^3 + 5 s^2 + 3 s + 6
-----------------------
s^3 + 6 s^2 + 11 s + 6
%for second example press a key
pause
num2=[1 2 3];
den2=[1 3 3 1];
[r,p,k]=residue(num2,den2)
r =
1
0
2
p =
-1
-1
-1
k =
[]
[num2,den2]=residue(r,p,k)
num2 =
1 2 3
den2 =
1 3 3 1
printsys(num2,den2,'s')
num/den =
s^2 + 2 s + 3
---------------------
s^3 + 3 s^2 + 3 s + 1
echo off
delete task2.txt
diary task2.txt
% Display the command lines in the command window
echo on
% Remove old variable definitions
clear all
%pak kardane command window
clc
% Remove old graphics windows
close all
%yaftane num/den az rooye sefr(z) ha va ghotb(p) haye an.k khareje ghesmat
%ast.
z=[-1;-3];
p=[0;-2;-4;-6];
k=4;
[num1,den1]=zp2tf(z,p,k)
printsys(num1,den1,'s')
%yaftane z va p va k az rooye num/den.( bar akse amaliate bala. baraye ejra
%press any key.
pause
[z,p,k]=tf2zp(num1,den1)
% for second example press any key.
pause
%yaftane num/den az rooye sefr(z) ha va ghotb(p) haye an.k khareje ghesmat
%ast.
z=[-1;-2;-3];
p=[-2+j*3;-2-j*3;-5];
k=5;
[num2,den2]=zp2tf(z,p,k)
printsys(num2,den2,'s')
%yaftane z va p va k az rooye num/den.( bar akse amaliate bala. baraye ejra
%press any key.
pause
[z,p,k]=tf2zp(num2,den2)
echo off
diary off
% Remove old variable definitions
clear all
%pak kardane command window
clc
% Remove old graphics windows
close all
%yaftane num/den az rooye sefr(z) ha va ghotb(p) haye an.k khareje ghesmat
%ast.
z=[-1;-3];
p=[0;-2;-4;-6];
k=4;
[num1,den1]=zp2tf(z,p,k)
num1 =
0 0 4 16 12
den1 =
1 12 44 48 0
printsys(num1,den1,'s')
num/den =
4 s^2 + 16 s + 12
----------------------------
s^4 + 12 s^3 + 44 s^2 + 48 s
%yaftane z va p va k az rooye num/den.( bar akse amaliate bala. baraye ejra
%press any key.
pause
[z,p,k]=tf2zp(num1,den1)
z =
-3
-1
p =
0
-6.0000
-4.0000
-2.0000
k =
4
% for second example press any key.
pause
%yaftane num/den az rooye sefr(z) ha va ghotb(p) haye an.k khareje ghesmat
%ast.
z=[-1;-2;-3];
p=[-2+j*3;-2-j*3;-5];
k=5;
[num2,den2]=zp2tf(z,p,k)
num2 =
5 30 55 30
den2 =
1 9 33 65
printsys(num2,den2,'s')
num/den =
5 s^3 + 30 s^2 + 55 s + 30
--------------------------
s^3 + 9 s^2 + 33 s + 65
%yaftane z va p va k az rooye num/den.( bar akse amaliate bala. baraye ejra
%press any key.
pause
[z,p,k]=tf2zp(num2,den2)
z =
-3.0000
-2.0000
-1.0000
p =
-5.0000
-2.0000 + 3.0000i
-2.0000 - 3.0000i
k =
5
echo off
delete task3.txt
diary task3.txt
% Display the command lines in the command window
echo on
% Remove old variable definitions
clear all
%pak kardane command window
clc
% Remove old graphics windows
close all
syms s
v=1.92*s^2/(s^2+1)/(s^2+8/5*s+1);
pretty(v)
V=ilaplace(v);
pretty(V)
%for second example press any key!
%dar zir be raveshe raahet tari ebaarat haaye namaadin ra minevisim.
pause
f=poly2sym([2 8 2 -4],'s')/poly2sym([1 5 4],'s');
pretty(f)
F=ilaplace(f);
pretty(F)
echo off
diary off
% Remove old variable definitions
clear all
%pak kardane command window
clc
% Remove old graphics windows
close all
syms s
v=1.92*s^2/(s^2+1)/(s^2+8/5*s+1);
pretty(v)
2
48 s
-- -------------------------
25 2 2
(s + 1) (s + 8/5 s + 1)
V=ilaplace(v);
pretty(V)
6/5 cos(t) + 2/5 (-3 cos(3/5 t) + 4 sin(3/5 t)) exp(- 4/5 t)
%for second example press any key!
%dar zir be raveshe raahet tari ebaarat haaye namaadin ra minevisim.
pause
f=poly2sym([2 8 2 -4],'s')/poly2sym([1 5 4],'s');
pretty(f)
3 2
2 s + 8 s + 2 s - 4
---------------------
2
s + 5 s + 4
F=ilaplace(f);
pretty(F)
2 dirac(1, t) - 2 dirac(t) + 4 exp(-4 t)
echo off
delete task4.txt
diary task4.txt
% Display the command lines in the command window
echo on
% Remove old variable definitions
clear all
%pak kardane command window
clc
% Remove old graphics windows
close all
v=dsolve('D2v+9*Dv=1','v(0)=0','Dv(0)=0');
pretty(v)
%for the second example press any key!
pause
x=dsolve('D2x+Dx+4.25*x=1+t','x(0)=0','Dx(0)=0');
pretty(x)
%for the third example press any key!
pause
y=dsolve('D3y+D2y+4*Dy+4*y=10*sin(10*t)','y(0)=0','Dy(0)=0','D2y(0)=0');
pretty(y)
echo off
diary off
% Remove old variable definitions
clear all
%pak kardane command window
clc
% Remove old graphics windows
close all
v=dsolve('D2v+9*Dv=1','v(0)=0','Dv(0)=0');
pretty(v)
1/81 exp(-9 t) + 1/9 t - 1/81
%for the second example press any key!
pause
x=dsolve('D2x+Dx+4.25*x=1+t','x(0)=0','Dx(0)=0');
pretty(x)
47 52 52
- --- exp(- 1/2 t) sin(2 t) - --- exp(- 1/2 t) cos(2 t) + --- + 4/17 t
289 289 289
%for the third example press any key!
pause
y=dsolve('D3y+D2y+4*Dy+4*y=10*sin(10*t)','y(0)=0','Dy(0)=0','D2y(0)=0');
pretty(y)
25
5/48 sin(2 t) - 5/24 cos(2 t) + ---- cos(10 t) - 5/4848 sin(10 t)
2424
20
+ --- exp(-t)
101
echo off
delete task5.txt
diary task5.txt
% Display the command lines in the command window
echo on
% Remove old variable definitions
clear all
%pak kardane command window
clc
% Remove old graphics windows
close all
f=poly2sym([1 3 0 4],'s');
pretty(f)
%yaftane rishe haye chand jomleyi
d=[1 3 0 4];
r=roots(d)
% baraaye sakhtane chand jomleyi az rooye rishe haye an press any key!
pause
d=poly(r)
ff=poly2sym(d,'s');
pretty(ff)
echo off
diary off
% Remove old variable definitions
clear all
%pak kardane command window
clc
% Remove old graphics windows
close all
f=poly2sym([1 3 0 4],'s');
pretty(f)
3 2
s + 3 s + 4
%yaftane rishe haye chand jomleyi
d=[1 3 0 4];
r=roots(d)
r =
-3.3553
0.1777 + 1.0773i
0.1777 - 1.0773i
% baraaye sakhtane chand jomleyi az rooye rishe haye an press any key!
pause
d=poly(r)
d =
1.0000 3.0000 -0.0000 4.0000
ff=poly2sym(d,'s');
pretty(ff)
3 2
s + 3 s - 1/4503599627370496 s + 4
echo off
Error using ==> load???
Unable to read file net621: No such file or
directory.
Error in ==> compr at 11
load net621;