Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write a matlab function please 3.6 Function to compute position based on Newton's Laws 36.1: Function to compute position based on Newton's This tool is
write a matlab function please
3.6 Function to compute position based on Newton's Laws 36.1: Function to compute position based on Newton's This tool is provided by a thrd party Your activity is alhays recerded. 0/ ACTIVITY Laws but you may need to refresh the page to fil lin the banner 100 Assignment Write a MATLAB function XYPosition that takes parameters A, V, T, and that MATLAB s more flexible than traditional programming languages ike C, and alows a function to return multiple values by assigning to each return variable-in this case x and y Steps returns the (x, y) position predicted by Newton's laws of motion. Note 1. modity the body of the function to compute x and y based on Newton's laws. Define g, and recall that MATLAB defines different sine and consine functions for radians vs. degrees 2 instead of returning the resuts from the function, assign to return variables x and y 3. callthe function from the script window to test t 4 click "Run Function" to call the function and output the results 5 repeat steps 3 and 4 in order to test the function with different parameters When you are ready to submt for grading, scrol down and cick the Submt button and your function wil be tested You must psss all test cases to receive credit for this exercise. Your Function a Save Rese, MATLAB Documen 1% given angle, initial velocity v, and time t, compute object's position (x, y): 2, function 1x,y1XYPosition(A, V, T) y1.e s end C Reset Code to call your function a test your function here: Run Function DOLLStep 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