Sie sind auf Seite 1von 8
3761 ‘THE UNIVERSITY OF SYDNEY FACULTIES OF ARTS, EDUCATION, ENGINEERING AND SCIENCE COSC 1001 - COMPUTATIONAL SCIENCE IN MATLAB ‘COSC 1901 - COMPUTATIONAL SCIENCE IN MATLAB (ADVANCED) NOVEMBER 2010 ‘TIME ALLOWED: 90 MINUTES ALL QUESTIONS HAVE THE VALUE SHOWN INSTRUCTIONS: ‘© Students in COSC 1001 should attempt questions 1,2, and 3. ‘© Students in COSC 1901 should attempt questions 1,2, and 4 # This exam is not open-book. ‘¢ Non-programmable calculators are permitted. ox NOVEMBER 2010 Page 20f6 1 Allstadents should attempt the next 2 questions. Ian experiment designed to accurately measure he aceeeraton duc to gravity al is dropped down an evacuated tbe where tre identical poto-sensors Gime the passing of the bal. The photo-sensors are positioned a 0, | and 3m down te tube. The mation of| the ball inthe pipe ean be described by the equation gO +i pem my, o In this equation, she aceleration de ogrviy, represents the position of a sensor down the tube and and care constants that relate o ow the balls droped. (3) Inone experiment, a all passes the sensors at 0.07053 snd O88 seconds. Wee ‘own the thee linear equations representing these constns, and express these ‘equations as single matrix equation, (©) Using the matlab funtion Any, write down a series of MATLAB commands 0 solve forthe vector conning 9, bande (©) Write a MATLAB function that kos a input vector containing the thee times ‘hat the bal passes the sensors and ourpus the aeeeraton due to gravity. Your answer shoul involve the division of mates (@) After running 9 experiments using your fueson, resus have been stored in row ‘ectoe g. Wete a MATLAB command (or series of commands) that displays the best extimite for g based on these 9 experiment, and the standard enor of your ‘etme. Make your code general, so tha it would woek for vectors g of any Jeng greater than 2, (10 marks) 9387 NOVEMBER 2010 Page Sof 4. THIS IS A REPLACEMENT FOR QUESTION 4 ‘This question is for COSC 1901 students only ‘When modelling the transfer of heat along a rod or bar the temperaate ofthe rods given by the following differential equation: Ca tart nea e Where a(c) is a parameter describing the thermal condictvty and geometry of the rc Consider a od of length | where the two ends are fxed to heat reservoirs at temperature 0. giving boundary conditions T(0) = 0 and 7(1) eigenvalue problem by seiting T(z, 2) = Ts(z) h(t) and setting each side to AT.(2)T.(2) Separately. This is similar tothe problem of the vibrating wire covered in lectures, except that inthis ease the solution tothe time dependence is given by Ts) — exp(kt) where Wwe find that <0, (@) Setting a(x) = Lm? (Le. aconstant), write down a series of MATLAB commands that solves this eigenvalue problem fr 7, withthe rod spit up into segments, Tor instance N equal 09. (©) Two distributions of inal temperature ofthe rod are shown below, Distibution A happens tobe a scalar multiple of an eigenvector with eigenvalue 0.014, and distibution B is a scalar multiple of an eigenvector of eigenvalue 0.33. In or er the eigenvalues are 0.014 0.054,0.12021 0.33... Desribe quantitatively, with reference to Bquation 2, the time evolution ofthese two temperature distribution. VN ‘0 02 04 08 a8 ¢ Distribution A: Bigemvalue 0.014 Distribution B: Eigenvalue 0.33 93181 NOVEMBER 2010 Page 6.0/6 (©) A third inital temperature distribution is shown below, and is linear combination of several eigenvectors. Aer many (> 20) seconds, what Would you expect is temperature distribution to look ike? (10 marks) ‘THERE ARE NO MORE QUESTIONS. 93781 NOVEMBER 2010 Page 30f6 2. (@) Sketch the pica ouput he ollowing ine of MATLAB code >> hist (round(rand(1,1000)+0.1),021) (©) Consider a biased coin which lands GOS ofthe tne a6 heads, and 40% ofthe time a tis, Using the expression rom pat (a), complete he following MATLAB Script which compuites th probability of observing less than two heads when the in is tosed ten times, ‘missing Line of code Y'mlasing Line of code (©) The computation desea in prc (b) ypelly returns a probability of sound 0.16%. Describe what would happen othe calculation if the numberof trials ‘was reduced o 1000, (10ers) 93781 NoveMser 2010 Page dof 53, ‘This question for COSC 1001 stadents only (a) The (2,y) coodintes of en abject as fnction of tine ¢ ar given by a) = w= «2-0 for 0 < t < 2, Write down s short MATLAB program which uss vector and logial operation o compat theme at which the objects furthest wo the iin. ‘The program shoul also determine the minimum distance Note: for fall marks your program should not wie for or whe lope (6) Wit dowa the output of the following MATLAB commands @ are; peaini/203.17 sum({ay b)) (i clear for ints318 xtfyad 2s end Find vozeiy pq 95 6 8 91 yi? 0 7-1-4 617 Bey>o) (10 marks) 3181 NOVEMBER 2010 Page Sof 4. This question ffor COSC 1901 students only ‘When modelling he tafe of heat longs odor bar the temperture ofthe roi given by the following diferetl equation: a 2 where a) isa parameter describing the thermal condicvty and geometry of he rod (Consider rod of length | where the two cos are fixed to heat reservoir a emperstre 0, giving boundary condions 7(0) = 0 and T(1) = 0. This ean be formulated a an clgenvalue problem by sting T(z, 2) = T2)(t) and setting each side to Te(2)T(0) separutely. (@) Setting (2) = 1m? 2. aconstan), write down a series of MATLAB commands that solves this eigenvalue problem fr T, with the rod split up into segment, for instance V equal 9 (©) Two distributions of inal temperature of the rod are shown below. Distribution ‘A happens tote a salar multiple ofan eigenvector wit eigenvalue 0014, ad “iscbution B isa scar mukipe of an eigenvector of eigenvalue 0:3. In or er the eigenvalues are 0.014 0054.0.120.210.33.. Describe quantal, th reference to Egiton 2, the time evoition ofthese two tempertue dstebutons. Distribution A:Bigemelve 0.014 Distribution B:Eigemalue 0.33 xe NOVEMBER 2010 Page 606 (6) A third initia temperature dstsbutin x shown below, and is near combiaton ‘of several eigenvectors. After many (> 20) seconds, what would you expect is temperature distbution ook like? i | Waa ae (do marts) ‘THERE ARE NO MORE QUESTIONS.

Das könnte Ihnen auch gefallen