Question: Given f ( x ) = sin ( 5 x ) - x ^ 3 / 2 + 1 . 2 , create a function

Given f(x)=sin(5x)-x^3/2+1.2, create a function m-file (m-file of function type, not script files) to evaluate ()fx at the given number of equally spaced points over the interval [-0.6,1.5]. Call your function m-file something like: yourinitialsh0fn (for yourinitials use your last name and first name initials, e.g., mine would be called sdh0fn.) Use the Matlab plot command to plot the function for the (x,y) ordered pairs from use of your function m-file to determine the y-values for the associated x-values. Use the feval command to implement the function m-file to get the y-values for your determined x-values in each case (e.g., my calling sequence would be, once I defined step and set up xvals, yvals = feval(sdh0fn, xvals).) Use help feval in matlab for further detail and examples if not already familiar to you. Create 3 plots with number of points n for: 5n=,20n= and one using a large number of points, at least 100. Apply the linspace command in matlab to generate the larger number of points. Put a grid and titles on your plots, see example below. LearnGiven f(x)=sin(5x)-x^3/2+1.2, create a function m-file (m-file of function type, not script files) to evaluate ()fx at the given number of equally spaced points over the interval [-0.6,1.5]. Call your function m-file something like: yourinitialsh0fn (for yourinitials use your last name and first name initials, e.g., mine would be called sdh0fn.) Use the Matlab plot command to plot the function for the (x,y) ordered pairs from use of your function m-file to determine the y-values for the associated x-values. Use the feval command to implement the function m-file to get the y-values for your determined x-values in each case (e.g., my calling sequence would be, once I defined step and set up xvals, yvals = feval(sdh0fn, xvals).) Use help feval in matlab for further detail and examples if not already familiar to you. Create 3 plots with number of points n for: 5n=,20n= and one using a large number of points, at least 100. Apply the linspace command in matlab to generate the larger number of points. Put a grid and titles on your plots, see example below. LearnGiven f(x)=sin(5x)-x^3/2+1.2, create a function m-file (m-file of function type, not script files) to evaluate ()fx at the given number of equally spaced points over the interval [-0.6,1.5]. Call your function m-file something like: yourinitialsh0fn (for yourinitials use your last name and first name initials, e.g., mine would be called sdh0fn.) Use the Matlab plot command to plot the function for the (x,y) ordered pairs from use of your function m-file to determine the y-values for the associated x-values. Use the feval command to implement the function m-file to get the y-values for your determined x-values in each case (e.g., my calling sequence would be, once I defined step and set up xvals, yvals = feval(sdh0fn, xvals).) Use help feval in matlab for further detail and examples if not already familiar to you. Create 3 plots with number of points n for: 5n=,20n= and one using a large number of points, at least 100. Apply the linspace command in matlab to generate the larger number of points. Put a grid and titles on your plots, see example below. Learn

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Databases Questions!