1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ludmilkaskok [199]
4 years ago
6

Write a program (using a loop) that determines the expression. Run the program with n = 1:10, n=1:1,000, n = 1:100,000. Compare

the results with pi function. (use Format long)
Computers and Technology
1 answer:
prisoha [69]4 years ago
7 0

The question is incomplete! The complete question along with Matlab code and explanation is provided below!  

Question:

The value of pi can be estimated by: √6*∑1/n² from n=1 to n=∞

Write a program (using a loop) that determines the expression. Run the program with n= 1:10, n=1:1,000, n= 1:100,000. Compare the results with pi function. (use Format long)

Explanation:

We implemented a summation series that approximates the value of pi. The value of pi approaches to the real value of pi as n gets larger. we calculated the value of pi using a for loop with n= 10, n=1,000, and n= 100,000 then compared this value with the value of built-in function of Maltab pi. The results are discussed below.

Matlab Code:

format long

n = 100000;

sum = 0;

for k=1:n

   sum = sum + 1/k^2;

end

value = sqrt(6*sum)

pi

diff = pi - value

Output:

For n = 10:

pi =    3.141592653589793

value =  3.049361635982070

diff =    0.092231017607723

For n = 100:

pi =    3.141592653589793

value =  3.140638056205995

diff =     0.000954597383798

For n = 100,000:

pi =    3.141592653589793

value =    3.141583104326456  

diff =      0.000009549263336

As you can see the difference between real and calculated value of pi is quite large for n = 10 but the difference is very small for n = 100,000. The calculated value is correct up to 4 decimal digits for n = 100,000.

You might be interested in
Why is Data-Driven Analytics of interest to companies?
vivado [14]

Answer:

It allows companies to make definitive predictions about the future. It gives companies the ability to make informed decisions.

It helps Data Analysts shape an analytics problem from a business problem.

Explanation:

4 0
3 years ago
What is the tendency for an individual to have better memory for information that relates to oneself in comparison to material t
Elena-2011 [213]

Answer:

The answer is "Option c".

Explanation:

The self-reference will affect the appears, that enables the people to transmit data separately, as per their degree of knowledge, If people are willing to identify the information, the frequency of recalling may be increased if it is linked in some way to ourselves, and other options are wrong, that can be described as follows:

  • In option a, It is used to store information for a long time, that's why it is not correct.
  • In option b, It is used for both, input and receives sensory register and the long-term store, that's why it is not correct.
  • In option d, It provides cognitive interference that's why it is not correct.
4 0
3 years ago
What are they
kifflom [539]
1) Input devices are any devices that input information to the computer - Examples include your keyboard, mouse, microphone, ect.

2) Output devices are any devices that output information from the computer. - Examples include your monitor, printer, headset/speakers, ect.

3) Processing devices are devices that take the information and process it. The most obvious example of this is the Central Processing Unit (CPU) on your computer.
6 0
4 years ago
Read 2 more answers
Which layer in the Internet Protocol Suite model verifies that data arrives without being lost or damaged?
zloy xaker [14]
It is D I believe

Explanation:
4 0
3 years ago
A hardware company is considering adopting customer relationship management solutions. What are the possible advantages the comp
irinina [24]

Answer:

Finding customers for your business is not easy. And once you find them, there comes another challenge – Establishing and maintaining strong relationships with them.

CRM software helps you centralize, optimize and streamline your communication. The better you know your customers, the stronger your relationships will be with them.

Here, we share 6 CRM benefits that focus on key customer relationship areas, allowing you to offer high-quality, consistent and timely interactions with your customers.

Explanation:

4 0
3 years ago
Other questions:
  • Jim has excellent oral and written communication skills. He enjoys public speaking and wants a job in which he will interact wit
    10·2 answers
  • Please what's the answer to this
    14·1 answer
  • Select all that apply. Given the following code fragment, which of the things shown below happen when the statement on line 8 ex
    13·1 answer
  • It’s important to consider adjusting a user’s social network permissions (or access) because
    6·1 answer
  • Data arranged and stored in a data set
    9·1 answer
  • How can you re-engage users who have abandoned your app after their first use?
    12·2 answers
  • An effective problem statement ensures that
    12·1 answer
  • __________ is a collection of formatting options—such as a frame, a rounded shape, and a shadow—that changes a picture’s overall
    5·1 answer
  • What integer is represented by the following 8-bit twos complement representation: 1011 0000 ? (Enter your number in decimal, an
    6·1 answer
  • What is word wrapping??
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!