Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
59 views
MATLAB Unit 5 Part 1
matlab unit 5
Uploaded by
meghanagottipati2
AI-enhanced title
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
Download now
Download
Save MATLAB_Unit_5_Part_1 For Later
Download
Save
Save MATLAB_Unit_5_Part_1 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
59 views
MATLAB Unit 5 Part 1
matlab unit 5
Uploaded by
meghanagottipati2
AI-enhanced title
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
Download now
Download
Save MATLAB_Unit_5_Part_1 For Later
Carousel Previous
Carousel Next
Save
Save MATLAB_Unit_5_Part_1 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 16
Search
Fullscreen
eS ordinary differential Bysstions (ODEs) _- Many problems in sclence and. Angineering can be -formulated Into ordinary differential Equations (DES). — ODEs can he of @ Fivst-orew ODE and P. ii) Second —order OPE « Boia ie ele gider ardinary differentia} duration {First otder QU,3 — at fs an Gqstion that contains the derivative ef the dependent vartable » the qeneral form af First-order ook 1s, &cpessed 95, aa de. tou | coe cere Eenx fs independent variable 4 15 dependent variable. @ = order evel ahi 7 Second ~cr: linens differential sau tion Ciccone ~okler ODE): Tete cn aaustion hot confamns the “Second derivative op the dependent vartatle he> 3 ~The deners! forn q-the seaond-order oDe 1s expressedsolution of ordinary differerdt'al éoyrstors (ODES) =the elution g, an addinay differential dustion usually means, Finding Saclear—cut expre ssion fer y’ in terms of a defined numter of simple -fimerims of the Solution can be obtained based on relationship bbehicen oe! ard |! Such 2 solution 5 Knosn as the clesed form, — Numerical metheds also piovide Solution to ODES. —the ‘numerical methads fir sdving an ong ate as follonas; () Taylor’ series method. (2) Ewer's method + (2) Modified Euler methedt . (4 Picarals method ej successive approximation, (5) Runge — Kutta method. (6) Predictor corrector methods : Adams Moulton Method. = ta MATLAB environment, the. command _Asdlve. is used for obtaining a general solution. “Asolve’ Function : Se ~ For obtaining 2 general solution dan ofe, the MATLAB cowmare, alsolve, 1 Used cw agslve command has the fovm {Ssmtad) ¢ clade (ear or [aeche(o/, vr!) —Here, 27 is the €auation to be soled. Bt hac to he typed 35 3 shaing- yar is the Variable Tt hes to be ped as sting. AADLELVILI2 2Sim the dsdve(es') commana, by MAnAB to be ECdefaulty — 7 the. dsolve (‘ey "vary Command, User defines the Indepenctent Veristle as var, Hh MATLAB the letter D denotes differert’stion 1. dy, Sh tav~ 108 is tyred th matiag as, = Flid the general solution @ the fivetovder abe dy Manas sexipt. >> deolve('Dy= 4%t-4 271) = Find the general Solution of the second oveler ODE, dx SE tae trae. using dese Dasslve (pana Devx=0) ans = hlexpeo 2% exper) Ge = ate2y using —} Fo the Command winder, type ner, Y= CE 2k a ans = mn chremate)= ate <1 Ts dispiageatie WeC Bae aK’) MATLAB solves the Cavetin, dé arene set = amet "Ds Gtetaya tes MATA Sees the fauation, 4S = at. Spasavet Ds=a"%"2!, 'a'D I* re soucin 32 Lae daa] Cy (aretnf2ten ey s ey (Particular solution ef an ODE I = Tf boundary ov initial conditions ave specified, # particular 4 Solution of an ODE can be obtahed. a —A Fivst-ovdey bE reauives one_condition :, A. second ~ovder ope teauiiies so conditions. = The firsovder ote has the -form, * dese C'en!, 'conds!, 'var') = Forcthe Higher-ovcer OPE, the. Syntax 4S s \asalveCeg/ 'conds', ‘ema! =the boundary conditions ave. typed as _stzings Tver ete MATING fame yee “ytay =A Yoo 2a er D Yitay = a coeGomples. = sole the first-order OPE} di sy oé5 | Lim the Tritial Condition Y= using Matias. 8 In The MATLAB command window) type the following: edsolve Covraty=60), tyeo)25') ans= - | The onsner I5— sofexpl ate Y= (5—(o/ett) is clisplayed Exomple > Sie the Second-order ODE a durayoo|, Yeoet using Maro. DasolveC'bay-2teyrory q ns = lexpley*caste)—expins sint O}, 'ye)=4!, 'pyco)
© write 2 function that computes -f,f.---~ fn for the given tnput (Xt) . Ber] — "Use the built-in ope solvers ade2a or ade4s to solve the feutztions! @ The. function written In Step-2 {S Usedd as an Tofu fo ae2s or ole as the. suntan 15: (time , solution’) = ode23('Your-function’, tspan, Xo) time. saltial conekivions: solution rear wasaie Funerion votre, Aire: Adak = \our-functin(te: This funenian comans, “the ans You Want 10 save. tine sen [to *nal] ‘Baract ‘the desired Variables frm the eutput One Ttermet the 1 results! | (@ For asystem of n €quations the output matrix solution cantatas “columns,opE23 and ODES ¢ soluing First-order equations Us = solve the frst-crcer Linear differential Euston, geewse with the initial condition xo) =o seeee: , INtite the. differential fustion(s) as set(aystern) A First-order oves Given Ope, dt x+t. = ntfs Written as, [es=rey (Zaenge! gorction ale) IS ERG (hee an Step-2: "waite a function “to com pute The statecne) derivative’, - aoe! Function xdot = simpodeCe): |” Snnre Xdot = xtt peal syntex te = simpede xalo\ ees xdot = XE sw Werite and Save the file 2s, on Mofile hit nome,
|Advanced Data objects: MATLAB SupppIts Severs) date objets. — Mo of them ate + diystructumes ond Aeells Data objects ate special cases of the fundamertal data tye ,the array —Most familiay data object in MATLAB [5 sthe matrix, Shuetuses|; — A structure i, Like 2_vecord, — Record-Keeping tn MATLAB fs Implemented Using structure Deft Actucture Is a date construct with several name fields. — one Yecond (structure) cantains Information abait serious things. These. things will be Under diffeent_ heads Cfieldp re can maintain 2 fecotd kok for our relatives. —one page fthe book will be ‘alloted to tach a our relative. — Ne can malist the -fllowing information tn éacn page 2S headings () Retationship (ily Adsress, ity Name of children GV) pote of- birth of all children LLLL Example qa Structure. t Doredte 2 Structure fallsem wlth three 3 oe, Dut Hee, ne Nish to Yecord the hames of courses, Panes OF corresponding professors and GD your perfirmance in ‘tests In ‘those. courses. ¢ Hn the commend winder 4 MATLas the following pears is typed - fietds: course, ProPand: > > > ? > , > > > > > > > > > > > > > > > > > > > > > ’ > > > Fallem. course = ‘estat's >> Fallsem Prof >? Fallen « Score = ‘turing!s [eas a: > Faligem’ Fallsem = course ! ‘estou! prot: ‘Turing! score: Ct0 75 95) att ae =e the above. Shuchre fallSem tne fields, case. and prof comain Character StYINgS | score contains vector of numbers (Raw vedo) Multiple recocis n a struchwe array: — A etyudure can be madeas-an array (shucture av¥) . — "the complete record fs stored as one slement of the array. —Fn Structure array , fath lement must have Same. number Se fields. Sramele: The shucwe. Fallsen becomes an array then tuo 4 more. Wrecovds are added, — Fa the Command Wine type the follosing Sp Falison Go. cause ="Dhaad! ; alleen (3). course >> Fall sem(z) - Por feqenbaunt, Fallsem a+ Prop 22 Fallsem(ad » Senre . = [12 15 Te]: FallSemda) score 2 'eomanujon': = [Bs as 66]: Tahen typed Aueried), MaTLAg rol gives structuel freformetion about jhe shuchne « Pallsem 1x2 struct anray Hh Fields: prof score— Fa the command winds ‘ys [TE] >rFalisem(n> ceurse ans = Piao (El >> Palicemcad. seavect) ont as (3). >opolisem, score , ans = 2045 45 ~ ans= 2 15 48 ans = es as ce [A >pfallsemay. Prof ens Tuving TE) ppalisem(t+ seoret2) ans= as vultiple records in field armas + Te could Stove multiple vecoreis in a Single Shuchwe . Thiste done, by Keeping the shudure 2S 1X4 + xomple: : in the example. FallSem, the Courses, Names cf professes el Geotes Be Coded 25 2 4x matrk struct - etter, = Fa the cammmemel winders, the fellowing is tured Falisem. course Fallaem. Prof, allsem soe = charCestot!, 'phyzoo!, 'math2us!); = char(‘turing! 'pregenbaum! !Ramanujon'); = (Bo 4 95:72 45 Fes os 35 SE]: 09 RALLEREDEDELRR IeeeCreating structures : ares “We Can ciente A chuchie, by typing its Wome almg tity 2 Cad and Assigning values to the field ~The other Way oh cresting 2 staichte, fe With the _Sfiuct function: — shuct-function Syntax: Struck (‘Feldnames), ‘Values! 'Geldnamae', value ~The shudure_Fallsem which ts Gesied Laclier, could al be Created Using the struct -funchion. —Tt's shatn helao; Z tyes @ As 2 single struct Fallsem = struct (curse “char(testot!, ‘phyaco!, Imatn2it!).. Prop’, charC'turing!, 'eregenbaum!, ‘Ramanugan),... score, [80 15 95: 12. 15 1B: 45 35 26J); As a stucture array; Se Fallgem = Peet tourse!, tst01’, 'proe?, "Turing "score, Ceo 15 453); stuct('course, >Phy200’, ‘prof! ‘pregenbauin? ..... °score’, C12 15 Te); Struct (course), wathast’ Spo? "Ramanujan? . score”, Tas 25-6¢3));one : ‘enipulsting siefames structures : - Manfpulation of shuchies fe simlorto spe. manipulation af general arraus, ~Thete axe. Sexer2! functions to support: the rianipulation of Structures, ~ they are; () fieldnames ©@ sebfield D se ield BD vofteld, @® isfretd The names af above functions jill! Suggest, what the. function sill do: « a © ° ¢ © © e oe e 29999990
You might also like
Group No. - 6 - Group Members 1. - 2. Hermoso, Danica 3.
PDF
No ratings yet
Group No. - 6 - Group Members 1. - 2. Hermoso, Danica 3.
37 pages
Computer Application For Chemical Engineering
PDF
No ratings yet
Computer Application For Chemical Engineering
20 pages
Cuesta - Activity 2
PDF
No ratings yet
Cuesta - Activity 2
28 pages
CAElab2 Results
PDF
No ratings yet
CAElab2 Results
29 pages
No No Section: Date of Submission
PDF
No ratings yet
No No Section: Date of Submission
20 pages
MATLAB Exercise
PDF
0% (1)
MATLAB Exercise
77 pages
Solving ODE in MATLAB: P. Howard Fall 2007
PDF
No ratings yet
Solving ODE in MATLAB: P. Howard Fall 2007
22 pages
Solving Ordinary Differential Equations With Matlab
PDF
No ratings yet
Solving Ordinary Differential Equations With Matlab
22 pages
Matode
PDF
No ratings yet
Matode
11 pages
Process Control-Lecture 09
PDF
No ratings yet
Process Control-Lecture 09
37 pages
EB103 - Math 3 - MATLAB 3 - Session 6 - 1st Order Differential Equations - Fall 2022-2023
PDF
No ratings yet
EB103 - Math 3 - MATLAB 3 - Session 6 - 1st Order Differential Equations - Fall 2022-2023
3 pages
matlab 5
PDF
No ratings yet
matlab 5
14 pages
Solution To Simultaneous or Higher Order Using Matlab
PDF
No ratings yet
Solution To Simultaneous or Higher Order Using Matlab
3 pages
Solution of ODEs With Matlab
PDF
No ratings yet
Solution of ODEs With Matlab
6 pages
4.4 Modelling Dynamical Systems
PDF
No ratings yet
4.4 Modelling Dynamical Systems
21 pages
T X T X T X: Using Ode45 To Solve Ordinary Differential Equations
PDF
No ratings yet
T X T X T X: Using Ode45 To Solve Ordinary Differential Equations
4 pages
T X T X T X: Using Ode45 To Solve Ordinary Differential Equations
PDF
No ratings yet
T X T X T X: Using Ode45 To Solve Ordinary Differential Equations
4 pages
Lecture 8
PDF
No ratings yet
Lecture 8
33 pages
Solving Differential Equations With Matlab
PDF
No ratings yet
Solving Differential Equations With Matlab
20 pages
Tutorial On Matlab: 1. Matrix Algebra
PDF
No ratings yet
Tutorial On Matlab: 1. Matrix Algebra
15 pages
Lecture 4
PDF
No ratings yet
Lecture 4
12 pages
MATLAB Report
PDF
No ratings yet
MATLAB Report
7 pages
E7 Ordinary Differential Equation New - 0
PDF
No ratings yet
E7 Ordinary Differential Equation New - 0
28 pages
PW_01_NLS
PDF
No ratings yet
PW_01_NLS
8 pages
MATLAB - Note 3
PDF
No ratings yet
MATLAB - Note 3
30 pages
Solving ODE Symbolically in MATLAB
PDF
No ratings yet
Solving ODE Symbolically in MATLAB
5 pages
Class 8
PDF
No ratings yet
Class 8
14 pages
Maxima by Example: Ch. 3, Ordinary Differential Equation Tools
PDF
No ratings yet
Maxima by Example: Ch. 3, Ordinary Differential Equation Tools
44 pages
Lec 23-24 Euler Method
PDF
33% (3)
Lec 23-24 Euler Method
36 pages
ODE Matlabb
PDF
No ratings yet
ODE Matlabb
11 pages
ODE Scilab
PDF
No ratings yet
ODE Scilab
154 pages
ODE Scilab
PDF
No ratings yet
ODE Scilab
155 pages
Numerical Methods For Engineers and Scie
PDF
No ratings yet
Numerical Methods For Engineers and Scie
7 pages
Solving Differential Equation Using MATLAB
PDF
No ratings yet
Solving Differential Equation Using MATLAB
33 pages
Differential Equation Solving With DSolve
PDF
No ratings yet
Differential Equation Solving With DSolve
118 pages
Wolfram Mathematica Tutorial Collection - Differential Equation Solving With DSolve (2008) (p118)
PDF
100% (5)
Wolfram Mathematica Tutorial Collection - Differential Equation Solving With DSolve (2008) (p118)
118 pages
Lecture 18_Chapter_24_boundaryvalue
PDF
No ratings yet
Lecture 18_Chapter_24_boundaryvalue
25 pages
Higher Order ODEs PDF
PDF
100% (1)
Higher Order ODEs PDF
3 pages
A Primer For MATLAB Tutorial and Documentation For Auburn University Chemical Engineering Students
PDF
No ratings yet
A Primer For MATLAB Tutorial and Documentation For Auburn University Chemical Engineering Students
29 pages
chap 1_2_3
PDF
No ratings yet
chap 1_2_3
38 pages
Matlab Examples ODE23!45!1
PDF
No ratings yet
Matlab Examples ODE23!45!1
4 pages
Beginner Matlab ODE
PDF
No ratings yet
Beginner Matlab ODE
27 pages
Diff Eqn Book Jas
PDF
No ratings yet
Diff Eqn Book Jas
543 pages
MATLAB Tutorial On Ordinary Differential Equation Solver (Example 12-1)
PDF
No ratings yet
MATLAB Tutorial On Ordinary Differential Equation Solver (Example 12-1)
34 pages
Lecture5 Body
PDF
No ratings yet
Lecture5 Body
24 pages
Matlab Tutorial LEP 12 1
PDF
No ratings yet
Matlab Tutorial LEP 12 1
32 pages
201508_Afroza Lona Mim_2020-2021.just
PDF
No ratings yet
201508_Afroza Lona Mim_2020-2021.just
14 pages
MATLAB Unit 1 Study Material
PDF
No ratings yet
MATLAB Unit 1 Study Material
46 pages
MATLAB Unit 2 Study Material
PDF
No ratings yet
MATLAB Unit 2 Study Material
37 pages
MATLAB Unit 3 Part 1
PDF
No ratings yet
MATLAB Unit 3 Part 1
32 pages
MATLAB Unit 4 Part 1
PDF
No ratings yet
MATLAB Unit 4 Part 1
25 pages