Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

4. Review periodically.

Answered: 1 week ago