Please find the required MATLAB script as the following:
%======================================================================
clear all;
clc;
x = pi/5; % Given x value
k=0:6; % Given number of terms
sinx_approx = 0; % Initialization of approximation variable
fprintf('# of terms\t Estimate\t\t True Error\t\t
MAPRE\n');
fprintf('----------\t------------\t------------\t------------\n');
for i = k
sinx_approx = sinx_approx + ((-1)^i *
(x^(2*i+1))/factorial(2*i+1));
fprintf('\t%d\t\t%0.10f\t%0.10f\t%0.10f\n',i,sinx_approx,abs(sin(x)-sinx_approx),abs(sin(x)-sinx_approx)*100/sin(x));
end
%======================================================================
output:
Hope this helps!
***************** PLEASE THUMBS UP!!!!!!!!!!!!!!!!! *****************
someone please do this corrcetly using matlab and following all instructions 1. (30 Points) It is...
1. For the series below, use Excel to generate a table with columns of absolute true error, absolute approximate error, absolute percent relative true error, and absolute percent relative approximate error and plots of absolute percent true error and absolute percent approximate error vs number of terms calculated for x - 0.75. Calculate up to 10 terms. Use Excel's Inx function to generate a true value.
QUESTION 1 Given sin(x) = x- + 3! 5! The true error in using three terms to find sin(2.2) SL QUESTION 2 Given sin(x) = x- + 3! 5 7 The relative true error in using three terms to find sin(3.5) is QUESTION 3 Given sin(x) = x- + The percentage relative approximate error in using three terms to find sin(3.6) is percent Click Save and Submit to save and submit. Click Save All Answers to save all answers
use MatLab to answer these questions 1. (10 points) Create an m-file called addup.m Use a for loop with k = 1 to 8 to sum the terms in this sequence: x(k) = 1/3 Before the loop set sumx = 0 Then add each term to sumx inside the loop. (You do not need to store the individual values of the sequence; it is sufficient to add each term to the sum.) After the loop, display sumx with either disp()...
MATLAB only please I am trying to get my getdatafuntion to work. I am also trying to get all my x's, y's, and v's to popup in the command window so I can put in any value and it will find the value for me using the equation I put in. function project_9_sjl() % PROJECT_9_SJL project_9_sjl() is the driver function for the program. % % Name: Scott Lawrence % Date: 3/27/2019 % Class: CMPSC 200 % Description: Determine the optimal...
Using Python, Can someone please assist in the following: These are the hints: Summary This week's lab is to create a simple multiplication table using nested loops and if statements. Prompt the user for the size of the multiplication table (from 2x2 to 10x10). Use a validation loop to display a warning if the number is less than 2 or greater than 10 and prompt the user to enter the data again until they enter a valid number Put a...
Problem 2. In this problem we consider the question of whether a small value of the residual kAz − bk means that z is a good approximation to the solution x of the linear system Ax = b. We showed in class that, kx − zk kxk ≤ kAkkA −1 k kAz − bk kbk . which implies that if the condition number kAkkA−1k of A is small, a small relative residual implies a small relative error in the solution....
MATLAB ONLY gauss.jpg BELOW Instructions: The following problems can be done interactively or by writing the commands iın an M-file (or by a combination of the two). In either case, record all MATLAB input commands and output in a text document and edit it according to the instructions of LAB 1 and LAB 2. For problem 2, include a picture of the rank-1 approximation. For problem 3, include a picture of the rank-10 approximation and for problem 4, include a...
Please answer all questions, I will rate you well. Thanks :) 14. 514 points | Previous Answers SCal:ET 11.11.021. Consider the following function. /(x) = x sin(x), a = 0, n = 4, -0.9 x 0.9 (a) Approximate fby a Taylor polynomial with degree n at the number a (b) Use Taylor's Inequality to estimate the accuracy of the approximation x) * Tp(x) when x lies in the given interval. (Round M up to the nearest integer. Round your answer...
please answer all prelab questions, 1-4. This is the prelab manual, just in case you need background information to answer the questions. The prelab questions are in the 3rd photo. this where we put in the answers, just to give you an idea. Lab Manual Lab 9: Simple Harmonic Oscillation Before the lab, read the theory in Sections 1-3 and answer questions on Pre-lab Submit your Pre-lab at the beginning of the lab. During the lab, read Section 4 and...