Question: In MATLAB (a) Create a function file named CubePlus7 that has one input variable x (which may be a scalar or a vector) and returns
In MATLAB
(a) Create a function file named CubePlus7 that has one input variable x (which may be a scalar or a vector) and returns the variable CP7, which is the sum of x cubed and 7. (b) Let a be a vector from 0 to 10 with increments of 0.5. Create a script file named ScriptCube Plus7 that evaluates the function CubePlus7 at vector a and then plots a versus CP7 using '*-' (star with dash). Make sure to add appropriate axis labels and a title to your plot; the commands to insert the labels and title should be in the script file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
