Write a MATLAB script to evaluate the equation f(x) = 2sinx + cos(x) + 10 for...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a MATLAB script to evaluate the equation f(x) = 2sinx + cos(x³) + 10 for all values of x between -2n and 2n, in steps of 0.2, do solve by vectorization Question 2 Write a MATLAB function to find the distance between points (x1.y1, 21) and (x2, y2, 22) in a three- dimensional Cartesian coordinate system is given by the equation D = √(x₁ - x₂)² + (₁ - Y⁄₂)² + (²₁ - 2₂)² Ask the user to input the values of (x1, y1, 21) and (x2, y2, 22). Question 3 Write a MATLAB program to create a mesh plot, surface plot and contour plot of the function for the interval -0.3 ≤ x ≤ 0.3 and -0.3m Sys 0.3m, in each case, plot the real part of z versus x and y. (10) 1 tư t 2= Question 4 Write a MATLAB script to plot the implementation of Q1, a. Plot the resulting function f(x) using dashed red line. b. Plot the function using stem c. Add title, Axis, legend and grid on the plot. Write a MATLAB script to evaluate the equation f(x) = 2sinx + cos(x³) + 10 for all values of x between -2n and 2n, in steps of 0.2, do solve by vectorization Question 2 Write a MATLAB function to find the distance between points (x1.y1, 21) and (x2, y2, 22) in a three- dimensional Cartesian coordinate system is given by the equation D = √(x₁ - x₂)² + (₁ - Y⁄₂)² + (²₁ - 2₂)² Ask the user to input the values of (x1, y1, 21) and (x2, y2, 22). Question 3 Write a MATLAB program to create a mesh plot, surface plot and contour plot of the function for the interval -0.3 ≤ x ≤ 0.3 and -0.3m Sys 0.3m, in each case, plot the real part of z versus x and y. (10) 1 tư t 2= Question 4 Write a MATLAB script to plot the implementation of Q1, a. Plot the resulting function f(x) using dashed red line. b. Plot the function using stem c. Add title, Axis, legend and grid on the plot.
Expert Answer:
Answer rating: 100% (QA)
Heres a MATLAB script and functions to address your questions Question 1 MATLAB Script for fx Questi... View the full answer
Related Book For
Numerical Methods With Chemical Engineering Applications
ISBN: 9781107135116
1st Edition
Authors: Kevin D. Dorfman, Prodromos Daoutidis
Posted Date:
Students also viewed these programming questions
-
Stop and frisk is a controversial topic, explain whether you believe if stop and frisk is a form of harassment or is stop and frisk necessary for law enforcement. In your answer explain what are the...
-
Stocks M and N have had the following returns over the past three years: 12 percent, -10 percent, and 32 percent; and 15 percent, 6 percent, and 24 percent, respectively. Calculate the covariance...
-
Assuming Ant has fully met the regulator's needs, how would this affect the IPO value? Also re-evaluate the new value.
-
Question 4: Artistic Hand for engineering Services was formed on Jun 1, 2018. The following transactions took place during the month of Jun: I The owner invested $20,000 cash in business. 2 Hired an...
-
A regression equation is set up, where the dependent variable is total costs and the independent variable is production. A correlation coefficient of 0.70 implies that: a. The coefficient of...
-
Firm WD sold depreciable realty for $225,000. The firm purchased the realty 12 years earlier for $350,000 and deducted $155,000 MACRS depreciation through date of sale. During an audit of the tax...
-
When constructing a common-sized income statement, all amounts are expressed as a percentage of: a. net income. b. gross profit. c. net sales. d. income from operations.
-
Baldwin Corporation made a public offering of $25 million of convertible debentures and registered the offering with the SEC. The registration statement contained financial statements certified by...
-
! Required information [The following information applies to the questions displayed below.] Jorgansen Lighting, Incorporated, manufactures heavy-duty street lighting systems for municipalities. The...
-
Pool Corporation, Inc., sells swimming pool supplies and equipment. It is a publicly traded corporation that trades on the NASDAQ exchange. The majority of Pools customers are small, family-owned...
-
XY earns $2 per share. It reinvests 40 percent (b) of it earnings at a return of 20 percent (R) per year/ The required rate of return is 15% a) What is the price of the stock? b) Its premium for...
-
Treadway has gotten used to the idea of leasing and is now considering an equipment lease of a computer. The lease terms call for a lease amount of \($3,280,\) a residual value of \($750\) and 18...
-
Determinants of CEO Compensation. Chief executive officer (CEO) compensation varies significantly from firm to firm. For this exercise, you will report on a sample of firms from a survey by Forbes...
-
Data 2.7 on page 95 introduces the dataset HollywoodMovies, which contains information on more than 900 movies that came out of Hollywood between 2007 and 2013. We will consider this the population...
-
Ajax Savings Bank has certificate of deposit notes with a face value of $\$ 10,000$ with a $10 \%$ interest rate compounded daily. What is the current market price of the $\mathrm{CD}$ if the term of...
-
A positively charged infinite sheet has a surface charge density of \(+5.0 \mathrm{nC} / \mathrm{m}^{2}\). What is (a) the electric field at a distance \(0.10 \mathrm{~m}\) from the sheet and (b) the...
-
Due to the trauma, Jesse breaks into an ice cream shop, steals all the ice cream, and is later caught. Which defense most likely applies to this situation? (Whether or not the defense will work is...
-
For a Poisson process of rate , the Bernoulli arrival approximation assumes that in any very small interval of length , there is either 0 arrivals with probability 1- or 1 arrival with probability ....
-
Show that Newtons method for f (x) = x 3 does not exhibit quadratic convergence.
-
Compute the following sums using base 10 and the indicated mantissa: (a) 12.4235 + 0.2134 with a 3 bitmantissa (b) 1.029439 + 4.3284 with a 2 bitmantissa (c) 4.532938 + 0.004938 with a 5 bit mantissa
-
Solve the following ordinary differential equation y"-2y, y(0) = 2, y(0) = 0 =
-
Discuss the relative advantages and disadvantages of doing daily partial backups versus daily full backups versus real-time mirroring. How does each option affect RPO and RTO?
-
What privacy concerns might arise from the use of biometric authentication techniques? What about the embedding of RFID tags in products such as clothing?
-
Segregation of duties is essential to good internal control. Increasingly, computer systems automatically authorize and record transactions, such as generating pur chase orders whenever the quantity...
Study smarter with the SolutionInn App