Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

matlab please Function Name: pokemonAthon Inputs: 1. (double) A 1xN vector describing the instantaneous velocities of your Ponyta 2. (double) A 1xN vector describing the

image text in transcribedimage text in transcribedmatlab please

Function Name: pokemonAthon Inputs: 1. (double) A 1xN vector describing the instantaneous velocities of your Ponyta 2. (double) A 1xN vector describing the times at which those velocities occur Outputs: (None) Plot Outputs: 1. A single figure with 4 subplots showing the position, velocity, acceleration, and jerk Banned Functions: polyfit), polyval(), polyint(), polyder() Background: You have just gotten you first Ponyta and you want to enter into the 2019 Flame Pokmon-athon, the most competitive Pokmon race out there for trainers to test the speed of their fire-type Pokmon! In order to be the very best you can be, you measure the instantaneous velocity of your Ponyta at different points in time along then analyze your Ponyta's performance Function Description: Given a vector of velocities and a vector of times, calculate your Ponyta's position (integral of velocity with respect to time), acceleration (derivative of velocity with respect to time), and jerk (2nd derivative of velocity with respect to time) for the duration of the race. Then plot your results in a 2x2 subplot. You should make all of your calculations using numerical integration and differentiation. Each subplot should have its axes labeled with the name of the quantities being plotted (e.g Position, Velocity, Acceleration, Jerk, Time), and contain the following results in the specified style 1) Position versus Time, green solid line 2) Velocity versus Time, red solid line 3) Acceleration versus Time, blue solid line 4) Jerk versus Time, black solid line You also need to specify the length of each axis. The range of each X axis should be from the minimum time to the maximum time for that subplot and the range of each Y axis should range from the minimum value minus 1 to the maximum value plus 1 Notes: . You should use cumtrapz for integration and diff for derivation . Your inputs are guaranteed to be at least length 4 . Shorten the time vector for derivatives by removing the last element(s) . The data given is guaranteed to be in time order

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions