MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
5th Edition
ISBN: 9781118629864
Author: Amos Gilat
Publisher: WILEY
bartleby

Videos

Textbook Question
Book Icon
Chapter 6, Problem 23P

The Taylor series expansion for cos(x) is:

cos x = 1 x 2 2 ! + x 4 4 ! x 6 6 ! + ... = n = 0 1 n 2 n ! x 2 n

wherex is in radians. Write a MATLAB program that determines cos(x) using the Taylor series expansion. The program asks the user to type a value for an angle in degrees. Then the program uses a loop for adding the terms of the Taylor series. If anis the nth term in the series, then the sum Snof the n terms is S n = S n 1 + a n . In each pass calculate the estimated error E given by E = S n S n 1 S n 1 . Stop adding terms when E 0.000001 . The program displays the value of cos(x). Use the program for calculating:

  1. Cos(35°)
  2. sin(125°)

Compare the values with those obtained by using a calculator.

Blurred answer
Students have asked these similar questions
Can you explain this statement below in layman's terms?   Secondary Analysis with Generalized Linear Mixed Model with clustering for Hospital Center and ICUvs Ward EnrolmentIn a secondary adjusted analysis we used generalized linear mixed models with random effects forcenter (a stratification variable in the primary analyses). In this analysis, the relative risk for the primaryoutcome of 90-day mortality for 7 versus 14 days of antibiotics was 0.90 (95% Confidence Interval [CI]0.78, 1.05).
In a crossover trial comparing a new drug to a standard, π denotes the probabilitythat the new one is judged better. It is desired to estimate π and test H0 : π = 0.5against H1 : π = 0.5. In 20 independent observations, the new drug is better eachtime.(a) Find and plot the likelihood function. Give the ML estimate of π (Hint: youmay use the plot function in R)
Can you explain what this analysis means in layman's terms?   - We calculated that a target sample size of 3626, which was based on anticipated baseline 90-day mortality of 22% and a noninferiority margin of no more than 4 percentage points, would give the trial 80% power, at a one-sided alpha level of 2.5%, accounting for a maximum of 5% loss to follow-up and for early stopping rules for three interim analyses.-

Chapter 6 Solutions

MATLAB: An Introduction with Applications

Knowledge Booster
Background pattern image
Statistics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, statistics and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Algebra for College Students
Algebra
ISBN:9781285195780
Author:Jerome E. Kaufmann, Karen L. Schwitters
Publisher:Cengage Learning
Text book image
Linear Algebra: A Modern Introduction
Algebra
ISBN:9781285463247
Author:David Poole
Publisher:Cengage Learning
Text book image
College Algebra
Algebra
ISBN:9781938168383
Author:Jay Abramson
Publisher:OpenStax
Text book image
Trigonometry (MindTap Course List)
Trigonometry
ISBN:9781337278461
Author:Ron Larson
Publisher:Cengage Learning
But what is the Fourier Transform? A visual introduction.; Author: 3Blue1Brown;https://www.youtube.com/watch?v=spUNpyF58BY;License: Standard YouTube License, CC-BY