Question: Write a user-defined MATLAB function for the following math function: y(x) = (- 0.2x3 + 7x2)e-0.3x The input to the function is x and the

Write a user-defined MATLAB function for the following math function:
y(x) = (- 0.2x3 + 7x2)e-0.3x
The input to the function is x and the output is y. Write the function such that x can be a vector (use element-by-element operations).
(a) Use the function to calculate y(-1.5) and y(5).
(b) Use the function to make a plot of the function y(x) for -2 < x < 6.

Step by Step Solution

3.37 Rating (181 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Script file clear clc dispPart a x15 5 ymathx dispThe test valu... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

652-B-F-F-M (728).docx

120 KBs Word File

Students Have Also Explored These Related Finance Questions!