Question

1. Consider the function y f(x) defined by Supposing that you are given x, write an R expression for y using if state- ments Add your expression for y to the following program, then run it to plot the function f. # input x,values <-seq(-2, 2, by 0.1) # for each x calculate y n <- length(x.values) y.values <- rep(0, n) for (i in 1 :n) x <- x. values[i] # your expression for y goes here y.values ij <- y # output plot(x.values, y.values, type1) Your plot should look like Figure 3.2. Do you think f has a derivative at 1? What about at 0? We remark that it is possible to vectorise the program above, using the ifelse function.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

It's a formal way... You can simply apply... You will got... I used r software.u) ejse else

Add a comment
Know the answer?
Add Answer to:
1. Consider the function y f(x) defined by Supposing that you are given x, write an...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT