Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SolveTask One We will start our exploration of the connections between sequences, series, power series, and computing by examining and executing a very basic computer
SolveTask One
We will start our exploration of the connections between sequences, series, power series, and computing by examining and executing a very basic
computer program. In doing so we will explore the basics of "Floating Point Numbers," which underlies how our computers store numbers.
The following code uses a "while" loop, which starts at the command "while" and ends at the command "end". A "while" loop operates much like a
for loop. After each command "sumsumdiff", the computer evaluates the condition in the "while" line. If the condition is met, the computer runs
the loop again, and the computer stops if the condition is not met. In this case, as long as "sum the computer will run the command
"sumsumdiff". Documentation on a "while" loop can be found here in the Mathworks Help Center MathWorks
The following code also uses the "vpa" function, which approximates numbers to various levels of precision. For instance, vpapi gives
significant digits of pi vpapi gives digits of pi and vpapi gives digits of pi Documentation on "vpa" can be found here in the
Mathworks Help Center Mathworks B
Task: Make the following posts. First, answer Questions for Code Questions for Code and then work towards a Final Group Post as
described below.
For your first post, read the following two codes ie Code and Code and answer the following questions:
Code
diff
sum
while sum
sumsumdiff
end
disp
This code can also be found in this Code document. DOCX darr
Questions for Code
Before you run the code, explain what the code is doing and what you expect the final value of "sum" to be
Run the code. Was the output what you expected?
Run the code at was the output as you expected?
Run the code at was the output as you expected?
Explain any discrepancies between what you expect the code to do and what the code actually does. See Code below if you need more
insight into these discrepancies.
This code can also be found in this Code document. DOCX:darr
Questions for Code
Before you run the code, explain what the code is doing and what you expect the value of ab to be
Explain any discrepancies between what you expect the code to do and what the code actually does.
Matlab stores as a "FloatingPoint Number." Use the result of ab to explain what happens with in Code
Fixing Code
By the end of Module your group should agree on changes to Code that would make it give a mathematically accurate output for and
for other potentially problematic values. Your suggested changes should also include an explanation of the errors in terms of sequences and
series and the resulting errors associated with partial summations.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started