1. Engineering
  2. Computer Science
  3. please answer on octaveonlinenet...

Question: please answer on octaveonlinenet...

Question details

3. Define in Matlab a function f which computes the value f(x) = 10-sin(z) + z2-z+ 7-cos(r). Make sure to define using it using the dotted versions of the operations, so that you can apply the result to vectors. (a) Construct a vector t of values from -6 to 6 with a step of 0.1. (b) Construct the vector of values y. (c) Plot the function on the given intefval using the vectors above. (d) Plot in the same window the function g(r) 0. To do that, you can just define an us function which outputs 0, or just graph the segment with endpoints (-6,0) and (6,0). (e) Note that the graph crosses the r-axis four times. This means that the equation f(r) 0 has four solutions in that interval. Use the fzero function to find all of these roots. For the second parameter of fzero, input a number which is close to the root that you want to find. Use the plot to guess a first approximation. (f) Verify the roots found by applying the function and see if you get 0, or a very close approximation.

please answer on octave-online.net

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution