0 ratings0% found this document useful (0 votes) 2 views24 pagesMATLAB72
Hand note of matlab experiments,that helps students to learn matlab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
7 New Erected | side oy nahin. com
Name of the expememend) prumeg'ecr| aifferemdial,
ov"
Oo syd? pseven 's gvem C foot end
: secow d
demiveahive)
Q When equidiis land two “peind wie
qrven |
|Pemsehon exam GQ ~Sraceray ‘|
Mein!) Come Numenical Formulas $0 compute
Fost Bewta- Denivedhine . 9) a
Pew 2 SOD FO5 Ot
h Arffemene
Prema,
fils s I> Foy { Backwond differen.
bis eh j » forren wu,
Few Derf OW.
Say 5 reel
> arwy rear. Gfammarns
2 pormd foormintel ovina s
ale
h- we m4 Aiffiaen oe - fowr weol
hep Waa ara ett me cereewtele
TOMA HER RY OLA be —Gerom
Game Nuomanteal Fepomiag to Compute Gerona
Dew ivadrve + PE Di ffenence Poscmetie
for 22) oS cur “fed
CT" ods Sy Fommand PF
‘ Pf" = Bored sf med ape 4 Brekwaod DF
oe
an — fom = 2FED 4 Men
f'eye LET $ oy remtnet
DF
— |? Shere 2 ret © formuitn ay }
PRT FHA 1» onfio-s
Code:
—_—___
ele
Clece aly
clean aly
f= aX wat btn,
Wer 4 5 4% Shep sire)
4=435 % deoralive .
P= 6 4% point of deonlvedy
fa = CHAM -fFM) /nbd= © fep-flr- 7h
od = Ch Cpanr~ Per /@*H)
else if d-:2
pa Cp treaty meg cend 1P) (Es
ba = Cf Cp-2P ey fF cp) TFPI OD
eas (ftp. 9 + fle r) (0D,
else disp (' Reeutts mod coves able 5
f evi.
at fd = foward i Aitpenenre formule,
vd = backwenel a m
ca = centane 7 .
Reouldg nod oven’ able (asthe carl
* -onfsr or differen baton oa goal
2th demyahve Gonos 1 789A) TYCerh
Fafa ger ) ab yStisr fm
}
y P > a3 on er poimt go KN aa
8
valwe CTA anna (ofr sald]BH Numem'ex! diffememer's'ar foo 6 qur'di'slam 4 ne
em
by Mewen *onbegeete Wing Porn .
Steps! @aneeh
wer! @ abe
O} UGe
Poumulla:
—
a diffemence duble
the fomomutta
f! um) = 4 +Pay,-4 44%
3. a 44
ta, + $A aly, ~ bay 4 haby
Co |
aA
\ ¢
No % \4y AY, ay, ay, ay ay,
’ [ 5
m Way ay, Py At ay,
x 4
“An. YAY Me O77 yy
v, A?
Y 9% 4%, %
| *
r\ a’ e
toy . Ya \ 1% 4
,
a
' ¥ y
My B 5
\ ~*~ 7 . ,
at use | é
given | ‘or N be -Bfatrs gue af two owrceohe
L , Slep @ an eauel)
Lo Veto eilby — fa L Ze acer
P Exel owtAWestion 'oimmurs “> |G MP eo My AAT
Aiffewen cteblo mn “Ca
“mara 27 1
Sar 4 er fonomulin Famur
areca 1 fomwend fom It Aifferen etaboo
> Denvadion
> Peri wourd 0 o & ”
DP frrrmuen A nam, min
> bee Wendl n and 4
Foumull ats
————_
flouy = 2 *Pay 24 449 gta 4 tanh
> h [ © TB WAS Moe Beal + Stal
6
. hn]
"
¢ Q ; Bae
I> aT ay ahh aby Ih]
A
point at the
Cn nd | i
ne wld re) beginving o.
ae Ja. bone
f (emad/a) . 4alc Ayr dy (a> 2 Wy yy (7!
a .
+ Fe © “Met wal)
i point ad tne ecntac 2
Ane table, Brut What if dhe debleeven
contain exted muorben of alata points yt)
244 + at +4, 403), ah GM 8 Bale,
Fwd = Tar om +i ae,
BAB j
Yn te 4 > |
uk
Plo se Day 4 ay nit at
code otter AN hremee
He RUD shea,
2
bum an,
for Q = 4;
Sum =
mum + COD C944 € Cay a4)
d MK
om |
ANF A = Sum Jy 9 f
al & ar
oo DH a—
Lideone: | a ener
ORL a
( dere
Cums Bum -} 44 Cer 44D) /qtmA degmee a aye +a, raman Uy ZWD |
3a jr lwp Ytett jyerd
Aiffre meo|e Neda be one )
Aiffereneiad io 7
Full code fox. any
>.
ele
Tleze al)
clean ay
we Ca hk 2.45 6 |;
Ys Tas 14.28 12 @G 21D ~ 48
im =Nemahtad
& = Beane (mnt); +
+ Den, |
405d =yy
Adz w+ 4;
fon prainal
fon fi-a. ae
4CG 5) eCity FD ACS -DS,
end
aa. ad . a3
end
aiep (4)
Y foo main pantSum = O% |
he MED = 90d S
fon f= 2 ee
cum = sum 4 CE dy. A» 4a, D755
enal Agpa = gum py .
age
fh» Jon ending of are tend J. an bere emai
qrom ane compton)» | Lue
jwt,
Sums os
ne med ered s 8+
fe 2 .
fon he e.
$m -<4
sum fsuem f(t Ke)
a ye
af G £
_ gum | 7y >
Aispl stiff dwee Nome! Nucmesize! Integration fon eaieliobend nw co-andincdes,
- Moshod ot => @ Traperidel Medtad @ Simpson's ¥
7 Pale
@Joaperoidal Meahed ; ‘
Ley Area uenelen any dooperer'd ,
y
1% “4 (i poven = 9x Lam DUK 4)
Wy
= &xnxlyr»
Org
So, Aye YHRbH UY. A71) fy 4x vx ly
Ar = xn ¥ nay)
= ARUN +43)
Aves. vende dhe drapeqod = AtAgt Aa o> + tn
= nT Hades Gia «0 - -Cnat >)
then T % +2 ya 4e to Yan) +¥m]
= %xn [peas 2S fenp 4+ Pemdt forse Poet
4 ftmn- a? + fos]
wish oder Method 8
Cloce au f © bead
clean cil} a ™, 4
L=@Ow sins, 3 §, OD rsirre
a 205%, {ower Leni T
b= pisry Kupper lend
n= 1ep0co, % MD eS eubintesva | (a0 the frag
’ eS res
ne Cb- Dl 5 > Mlolere Se rascal
Accunate
mE Athi bs phere ne eet) (1
- a wom or)
cum =o4 -
/ fom Pe agn-a
, . rdeoner
50m = Gum ft ema) 5 eo
ena
BNiGuw
ais h/at CRA t $b) 42% sum) /5N
Aw! 0:979978 YdDretnodton: Simpsoric Uf Aamethed! Rule «
| dnepe ted we ma upgmaskal versior »
Uy ameupegurd 9 ve (aug ermeed-ane wi altel 7° Bay
Tamera sewtonad omen eanrection ase mera.
> oAd mumben fave araiate Ane @ Mar 41) even Tm
. : abe 2dr ade
(aro “34 Simpsons |] 1 ate
fanr wapr wer mute warabyr arm Ld AY Ona 1
{0} oo an
ae a LD AinY 4+ ite)
. 4 ~ an an le . 5
~an0 ak SPO =) T nite’ 4pm +i]
- - An
an an
Ben S [aim t Bro tei] an
~Aan -~=_ an
2 Ce red
"
ay (a) 4 Ci 24%
> % Lanahata] ~O
s wrens mee anh y 270 -
Meh (ad 46 C-adte ~—O . |
When a= 0, EM TR ens /
vy, = ALOT BHD RM TE “@
whem + ma an by, oO
Ye AL aay AB Land) te
»,
Moy = A CLAM) He ;
DVyay = A CBA) F271 +7 B form
> Ye 7 Uy ty = 2han. |
Wn: a yar
from © oon . (2 Aan dior “%,
me 2 mm = ~2 46%
an = (¥ vinta Sel) 7s
Segment ~4 (Ye ' mar
=fre +41 ty) % [eeeh
% Segemrrd ant ener 2(Yat avs this 2 Tver ATyo, yinet qemrnstny™
of simpson
1 pareen = Ltt 2 atm tet DAA Het" 3
= eLteoped ae gordeperdabrde”)
+4 8 SOD sfema fons
2:4 [tems + Pema 42 fumst2") a$ (met)
Af Cay th) t-
4 af Fevetyy 4 i ome say tflowt ah)
goze fomids
“ete
close aly
clean aly Ds
+ mM
£= @WD Cers to fogedy + Pr
m= 4+ vata a baal ‘Gar ate
ne eI > > vad even
® S eqmend SAIN DUR WU
b=23 .
b= bv-a) ims Jet vipat
Summ = fled + PUD, oe gs ie
fore f+ 43 2in-a ' We bthsb
sum = oum +4*-f (atiFnry © a 2en aia
end No
for * = 2! DAN 2DW Sok: (mos
Gum = eum aa f lars AY; eteunete
end 2 Veda ene
a: (®,) Bum bX pens . . 5 pr onls
atte
tdeones com +]
/ UAV AN?Fee
Name! Golidion Simuldaneous equation of nm
» mem system .
y Linear eqecbion
@ Crnsys Jonden me thed
} sowe wate”
QB hauss Sredel medhoad
Squane Medinise
@® Cnauss Jovulan Mednozl -> “20? a4 1
Ga vem :
7 Q ‘ Aon +3a> +42 219
Br +loy +22 529
an +2 4 2-35
Cl ebelent malo,
oe 1S
- = v\= | 20
<<
“ad method @ | 35
uy Pivot
must main, Alagona) Poeral /
ext Pivot 4 “ste ae )
7213 let a cthed applicable 7
Somre malay + Coefticren
4 >” amedouy
} Madnik 2 AnqmentWH Pl vey wa TNMy 0 Da CI “ON Fapay
© ahonn
wap arate virad
bud somre
meadows wey ws sign cha “ana (BIA
- 1D:
. 0 ey | A
¥
> ° a %, 23
S92 ] 2e1l
° ° on 1 4
Gny txrorple ,
a °} 3 °
4 @o a "
3 2 s 23,
a 2 e -5
4 1 6 =H
> ~ 8 2 a
4
cohen Swap ap
chenqe «
code im Moatab - q
Y Crouse Joulen Methad -
cle
Close ald
clean alt
Az [10 3253 16244 2 1S
5
we [1p 2% 8B] % Sree velo~
> U4 2° a5) > | 2°
rn
' 2B
C Ap’) y, Augmented Moatwx
pve =
n= length cD 5 y. lenglv of Byes
gue number of
x = Reno3 tm, a) 5 Lpkrewn
Am = (C1 5 v3 a7) evrsnll
“wy .
a sywn 17 X
for eo) =atn
fg Ceol = Mey (01, DJ Aug eos ros
% malting dre pivot a5
for mow = 1:
if > view mr col Y avsiding due pve} ued
amu) = Aur Canowy cold 5
Avy (mows) = Avy (wow, » ~ aay" ae (c0),5 3
Yomaking O
end
end |
end ,
Avgemented Matnixg Ser
x= Ave| Gi, end) ° end WAT 1
"eeu mem wow Ulr col
“ater Prior |
[Link] /2yvltaZ & Crass
Jowzen
oe — MranadG Craussy Sieded Method
Linean rquntion solve “At
“ort ~wy areanad ag musth uml now wend
eaundion trenr same “3 wa |
Pp wes anain Aiagenal aared diagonal
clomimend 3D vat |
Say town *By +449 =D
Sn tiby 122 229
An: +2, W102 = 3B
fisck <1 > B41 -> dorminent
Ip} 342 > dominend
lo > 942-3 dom trent
ITAL mctned app) enable.
Finst © initialigatien, Morb, Y=b, Bro
Se, mn, — (29 2395 AE imilion Or
, 2 22 vanG 2a, > updeled Op
o>
te
a dea
25 = amy updated ty
are
- e ~ mew ~Koid _ _%a ~ Ke
won = =
“ new io
Bune. De ntiT
ay Eonon zhr given fotenence value
CONCH anced BRAT IBERIA
artocke Value (AI only code CUT
cnetcode im Matlab
y Cruse Sore! Method
ele
eloze all
etean al)
Fevers long § <> poinban aa et Value
z4y :
ma CD04
RUE 9» 265
HA( MDz 05
even _ n1 ay = 99995 gut - a
vy, > J DatT vee
while cymem_%4 Li) > = 10 42 onc Pho
maCigd) = Ca 2% %20d a etraiD) N25
me Cita) = (28 at nal (4d) -2* WaU)/5;
postin = Gee Baa PUES) i
erro 9 craa) = abs (ima lady a )/
matt 2D) Hipp 5
evmom 2 4a 2 abs ( (v2 44d) ~wati))
nmr Wiad) Shyu
abs ( (mo0'42) - nad) /
Maida) 715
exon Wa U'Ad _Czitay;
end : zl
coed = [etn va Cena) 4 er cord) 53 06" y)
may 7 KE? ®
quar Shug)
farts 73cer 1
radarcr Md HW 6
“or Bett pst
Bub comer micas emir cont “acd
com /n Awan A \
leon ideone'
OF. of the experimen }
=> Cuwe Ring filling ly least squenve
omedboa .
> -ebtr frortov sana 1 24 equmnre
: metwod
tude >G - quadnobic
onde =3, Avera
MW ~OyBIUT y Aa value. (4A “aralar |
imbempdlad yon = Ga atest!bed Basie Atffrrence “Blat
rac a rag CT
povd caer -matr ay imdenpeledvon aa
wicoyaherenty «= post rate Be bes
filed ~araqen
‘ y
x , ~y uber
: polahk
=~) -
cove. fiing
Riivaben!
we
ch the fimetron
fs =bu-t gq. e
Ls sere |
Umberseps ,
r eary, rf .
ad wee ME %~ ft)
'
ment leer sted |
IMAM meg
ab Men,I
“at
s civ oe Baers
(cg
Z,hrtool
yenm (AG
J
a tr
“GhA AA wey
HA
wncalg CA)
emo aa HAY
Am Scjuane
omethoal -
a
3
X
s
§z 4m
-polymomizal, fe = ew
2 zy, ~®
> OA +b =, Mio = Ta,
nn ~" .
= Se mer
> aeut +h = = La
-4 .
‘ a oye
mn Zu -
ia ~ b Suv
7 zu eu
°
Sr Sayt a ami y
> c = !
ou? Eun b Sniyy
. =
dx aed on
mi oa p> mut dipured by a
But =m
ele
Clear alf
Close ay
w =Car > GB) semieor
y = CS %% 4e % Us D,%¥>
az imput Ct No. of ondu sy Borgian length (od; Y vricauime! for graph plotin
gy
N = Ata;
A
Yoomautoux dimrn sion
Frev05 CN, NDS % coe cient omaluny
Pe reneg On, 2) 5 Y sowree vez tour
AY ~eyvet fon pond divleded
for Co =ain y. new oft A
for Jyrain y Zolummn of A
ALY \) = sum (x.r* Cias-dd5
end
end
7 ~,
fou & =4en Yo new ef B
Blu, ad = Sum Cmte (ued. 4%
end
Wo ‘oO io ; dow
LM eum a TvIe5 5 SHON ,
7? stedey (yar Solve
5S = ANB 3 7 SP IHhem foun conte 3a
x and Wy
an flip 05) 5 YA bu ta fom-med
Pp =p yo cym ( >) Y, poly noma)KY,
iY, 1
KX = linopace (td ) “Oi , 5
y= potyval CC x) ¥. Sinaia y
plot Cx, 1) from polyns-
am al
hold om
plot (mn, y, 'o')
Ly OS WE aati
=p Oates aa eu madex aa timesion
a talar sz 1
aaa Sommcc Vee hon aa column
a\\ dime 4, 2
a GO?
2
ae Suet
t
= mi = wt
a é
: CX,
‘5 power ony (oft a,
DAR
6 AA taney BL ATH 4
> Ge, Cray +2)
ON ATT “ANAM Squene aay ( Cyto)rk Baw > ENA ,
¥
Srey:
Lip yd Paty atu NOL | 24
2.4 yaa
Aye ey
a2 7"?
-aua a co bn +a onrman A ono
awer Ply nomial “a fy,
c
we orale /£
Ay
oew
covwm ai
poy sym
\imgpare ~> at 20 vome {nrar
era oor tuo tp
Cer cay | Seat
Poval we aed ye Pp pelynomiaj Ge
(eae Value (aa Aéld~ vA
uu fowr wed,
olel on ~P Same — GMAPH Br Oy ane
graph plek sata bay oe
ay \