Question: 1. Consider the continuous function x+10 if x 0 f(x)=x if 0 5 a) Write an R function which takes a single argument x.
1. Consider the continuous function x+10 if x 0 f(x)=x if 0 5 a) Write an R function which takes a single argument x. The function should return the vector of values of the function f(x) evaluated at the values in x. Example: > fun1 (c (-3,-1,0,2,5,10)) [1] 19 11 10 2 5 20 b) Write R codes to plot the graph of the above function on the interval [-10,10]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
