Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Many real-world objects travel in a jagged manner that is best represented by piecewise functions. For example, the velocity of a rocket may change sharply
Many real-world objects travel in a jagged manner that is best represented by piecewise functions. For example, the velocity of a rocket may change sharply when thrusters are enabled or disabled and due to various external factors. The velocity of a rocket can be modelled by v(t) where t represents the time. 1100-5t10stS 20 50t + 2(1-20)2.5 20 IS 30 v(t) = 1520e01-30) 0 t >30 otherwise Write a function that takes a start and end time as inputs and returns the vectors v and t. The vector t should contain values between start t and end_t at 0.01 increments. The vector v should contain v(t) for each value in t. function [t, v] - VPiecewise(start_t, end_t) Use the function in an m-file to plot the velocities for t--5 to 80. Hint: Use if statements to break up the different profile conditions
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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