Answered step by step
Verified Expert Solution
Question
1 Approved Answer
All three problems are actually one problem that need to be solved in one program matlab. Homework 5: Write one MATLAB program and make use
All three problems are actually one problem that need to be solved in one program matlab.
Homework 5: Write one MATLAB program and make use of the MATLAB's menu function that creates three (3) interactive menu buttons to solve the following 3 problems. Label the buttons, for example, as "Solution 1', 'Solution 2', and 'Solution 3. Present one solution when each menu button is clicked. Menu Example: choice - menu "Click a button', 'Button 1', 'Button 2', 'Button 3') switch choice case 1 disp('You clicked button 1.') case 2 disp('You clicked button 2.1 case 3 disp('You clicked button 3.') Problem 1: en ww The electrical circuit shown consists of resistors and voltage sources. Determine the current in each resistor, using the mesh current method based on Kirchhoff's voltage law. Vi = 12 V, V, - Ri= 20, R2 = 120, Ry=80, R = 6, Rs 100 (The result for X should be 1-1.2667; -1.7619; 0.5587; 0.20951) Print the answer on screen in the following format: The current in resister Riis 0.4952 A. The current in resister R2 is 1.8254 A. The current in resister R3 is 1.7619 A. The current in resister R4 is 0.3492 A. The current in resister RS is 0.2095 A. Problem 2: A ball thrown up falls back to the floor and bounces many times. For a ball thrown up in the direction shown in the figure, the position of the ball as a function of time is given by: y - Vt z = v.1-5812 The velocities in the x and y directions are constants throughout the motion and are given by v = v; sin () cos(a) and v = v sin() sin(a). In the vertical z direc- tion the initial velocity is v, - v,cos(6), and when the ball impacts the floor its rebound velocity is 0.8 of the vertical velocity at the start of the previous bounce. 158 100 The time between bounces is given by 100 50 x (m) 1 = (2v)/8, where v, is the vertical com- ponent of the velocity at the start of the bounce. Make a 3-D plot (shown in the figure) that shows the trajectory of the ball during the first five bounces. Take vp = 20 m/s, 0 -30, a -25, and g = 9.81 m/s2 ven by y(m) 5 00 .. . . - . . . ... . . . 8 Problem 3: Consider steady-state vibration of a friction-free spring-mass-damper system subjected to harmonic applied force: The normalized amplitude of the mass is given by: (12) + (260) where r= ww, is the frequency ratio, and is the damping ratio. Make a 3-D plot (shown) of the normalized amplitude (z axis) as a function of the frequency ratio for o srs 2, and a function of the damping ratio for 0.055 50.5. x=Xcoscot F(t)=F.coscarStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started