Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1 Create an Octave script file, hw 2 a . m , to do the following: A geometric series is defined as the sequence

Problem 1
Create an Octave script file, hw2a.m, to do the following:
A geometric series is defined as the sequence 1, x, x 2
, x 3
, x 4
,....in which the powers of x range over the
integers from 0 to \infty . The sum of the terms in a geometric series converges to the limiting value 1/(1-x)
if ||<1; otherwise the terms diverge.
a. For x=0.51, compute the sum of the first eleven terms in the series, and compare the
result with the limiting value. Repeat for 51 and 101 terms. Do this by generating a
vector of integers to use as the exponent of x; then use the sum function.
b. Create a vector with 3 elements that are the difference between limiting value and the
sum of the sequences for 11,51 and 101 terms.
Problem 2:
Create an Octave script file, hw2b.m, that allows the user to input the coefficients and constants of a
system of 3 linear equations. Determine if there is a unique solution and output that solution. Your
program should also check if the answer is correct and print out a message stating it is correct.
It is up to you to decide how to input the data. To test your program, the system of equations below has
a solution x=-1, y=2 and z=3
4x-2y+3z=1
x+3y-4z=-7
3x+y+2z=5
Problem 3:
Create an Octave script file, hw2c.m that does the following:
When an object is falling because of gravity, the following formula can be used to determine
the distance the object falls in a specific time period.
=122
The variables in the formula are as follows:
d= distance in meters
g=9.8
t = time in seconds
a) Prompt the user for the time in seconds.
b) Calculates the distance in meters it will fall at 20 time steps from 0 to the users input time
value. Output the distances.
Converts the distances calculated in b to feet. Output the distances in feet.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Describe the seven standard parts of a letter.

Answered: 1 week ago

Question

Explain how to develop effective Internet-based messages.

Answered: 1 week ago

Question

Identify the advantages and disadvantages of written messages.

Answered: 1 week ago