subject

Consider the function f (x)acos(tx) -5 (a) matlab has a built-in function for root-finding problems called fzero. to use fzero, you first need to create a function handle which can be done with an anonymous function. if your function handle is named fun, then you can calculate the root x using the following line of code x = fzero(fun, x0); where x0 is an initial guess. use fzero and an initial guess of xo = 5 to find the root of f(x). we will consider this to be the "exact solution" for the rest of the problem. save the exact solution in a9.dat (b) now find the root using newton's method. use a maximum of 50 steps, a tolerance of 10-3, and an initial guess of xo = 5. calculate the error by subtracting the newton's method solution from the exact solution obtained in part (a) and then taking the absolute value. make a 1 x 2 row vector that contains the error and the number of steps of newton's method that were performed number of steps) error save this vector in a10.dat

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Your task this week is to write a very simple spam classifier in python. it will classify messages as either spam (unwanted) or ham (wanted). the program will have a set of spam_words, words that are known to appear in spam messages. that set is included in the template file spam.pypreview the document. you will also define a spam threshold which reflects the allowed percentage of spam words in the message. you'll compute a 'spam indicator', which is the ratio of spam words to the total number of unique words in the message. if the spam indicator exceeds the spam threshold, the message is classified as spam. otherwise it is classified as ham. we'll assume that the spam threshold is a constant and has a value of 0.10. your program will prompt the user for a message and then will print the corresponding spam indicator with two decimal digits and the corresponding classification (spam or ham). the program will be case insensitive. the spam words are detected whether they are in lower case or upper case or mixed case. each word, spam or not, is counted once (even if it appears multiple times in the message.) the program will remove punctuation from the message before identifying the words and computing the spam indicator. for example '! ' must be identified as the spam word 'now'.
Answers: 3
question
Computers and Technology, 23.06.2019 07:30
What part of the interface displays the external references contained in a selected cell? the status bar the review tab the scroll bar the formula bar
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
Which steps will open the system so that you can enter a question and do a search for
Answers: 1
question
Computers and Technology, 24.06.2019 16:00
How are roger williams, james oglethorpe, and william penn similar?
Answers: 3
You know the right answer?
Consider the function f (x)acos(tx) -5 (a) matlab has a built-in function for root-finding problems...
Questions
question
History, 30.03.2021 19:10
question
Mathematics, 30.03.2021 19:10
question
Mathematics, 30.03.2021 19:10
question
Business, 30.03.2021 19:10
question
Mathematics, 30.03.2021 19:10
question
Social Studies, 30.03.2021 19:10
question
Mathematics, 30.03.2021 19:10
Questions on the website: 13722361