Essential MATLAB for Engineers and Scientists PHẦN 10

Hệ thống này của DES có thể được giải quyết rất dễ dàng với ODE giải quyết MATLAB. Ý tưởng là để giải quyết DES với những điều kiện nhất định ban đầu, âm mưu các giải pháp, sau đó thay đổi các điều kiện ban đầu rất nhẹ, | 17 Introduction to numerical methods This system of DEs may be solved very easily with the MATLAB ODE solvers. The idea is to solve the DEs with certain initial conditions plot the solution then change the initial ondH iom veryslightly andsuperimpose the new solution over the old one uopeo howmochis hya chneged. We begin by solving theeyntum witin toe ininitI conditioepo 0 -2 y O andz 0 21. p f Write a function file to represent the right-hand sides of the system as follows function f loocnzit x f zeros 3 1 f 1 10 x 2 -x l f 2 -x l x 3 28 x l - x 2 f 3 x l X 2 -8 x 3 I 3 The three eleme ts of the M-TLAB xe3tor X . xtl X 2 and X 3 represent the three dependent scalar variables X y and z respectively. The elements of the veetor ereprccent tnv right-handoipes nf 3he ShrxeXEs. When a vector is retfimedbyeuefa Defenution inmpstPep celumn vector hence the statemenc f zeros 3 e S Now use the following commands to solve the system from t 0 to t 10 say xO -2 21 initial values in a vector t x ode45 @lorenz 0 10 xO plot t x Note that we are use Ode4 5 now since it is more accurate. If you aren t using a Pentium it will take quite a few seconds for the integration to be completed. You will see y and z in different colors . It s easier to see tne xffeahefehangingrhe Inltial nalnus if dhureísonlsone graph in the figure to start with. It is in fact best to plot the solution y t on its own. 377 Essential MATLAB for Engineers and Scientists Figure Chaos The MATLAB solutionx isactually a matrix with three columns as you can see from whos . The solution y t that we want will be the second column so to plot it by itself usethe command plot t x 2 g Then keep the graphon theaxeswiththe command hold. Now we can see the effect ufcheuging thainieifl f justchangehPe initial value of x 0 from -2 to that s a change of only 2 percent and in only one of the tame initial ualuee. The foilawingnommandswilldothis solvu the DEs and plotthe

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
54    421    8    21-05-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.