Question: use matlab to create this program. will rate very high Function Splicer Using Matlab Your task is to write a program of the form function

use matlab to create this program. will rate very high use matlab to create this program. will rate very high Function Splicer

Function Splicer Using Matlab Your task is to write a program of the form function [h1,h2] = functionsplicer (f,g,xo,p) that takes two functions f and g and a point zo and returns the functions and h2(x) max{f(x,p), g(x)) It should have the following properties: 1. If zo is not provided (see nargin), then it uses the default value o 0 2. If p is not provided, then the program just uses f(x) instead of f(x,p). 3. The definition for h2(x) should be an anonymous function and take just one line. Make a Plot In a separate Matlab file, you should use functionSplicer to make plots of hi and h2 given the functions f(x) = cos(30x) (in degrees), g(x) = e, and x0--1. Plot them on the domain [-5, 1] and turn in a copy of the plot along with your code

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!