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
Mamont248 [21]
3 years ago
7

g The reciprocal Fibonacci constant ψ is defined by the infinite sum: ψ=∑n=1 [infinity] 1 Fn Where Fn are the Fibonacci numbers

1,1,2,3,5,8,13,…. Each element in this sequence of numbers is the sum of the previous two. Start by setting the first two elements equal to 1, then Fn=Fn−1+Fn−2 . Write a MATLAB program in a script file that calculates ψ for a given n.

Computers and Technology
1 answer:
timama [110]3 years ago
5 0

Answer:

see explaination

Explanation:

MATLAB script:

% MATLAB script that calculates reciprocal Fibonacci constant Ψ

% Initial Values

a0 = 1;

a1 = 1;

% Looping variable

i = 2;

% Reading n value from user

n = input(' Enter n value: ');

% Initializing sum

sum = (1/a0) + (1/a1);

% Loop till i reaches n value

while i <= n

% Finding term in Fibnocii series

a2 = a0 + a1;

% Accumulating Sum

sum = sum + (1/a2);

% Updating previous terms

a0 = a1;

a1 = a2;

% Incrementing loop variable

i = i + 1;

endwhile

% Printing result

printf("\n Reciprocol Fibnocii Constant: %f \n", sum);

See attachment for sample output

You might be interested in
r packages include sample datasets. they also include reusable r functions and documentation about how to use the functions. Tru
Dvinal [7]

r packages include sample datasets. they also include reusable r functions and documentation about how to use the functions.

The above statement is <u>True</u>.

What are R packages?

<u>The statistical programming language R has extensions </u>known as R packages. Users of R can install R packages by <u>accessing a centralized software repository like CRAN</u>, which often contains code, data, and documentation in a common collection format.

The "library" directory is <u>where R </u><u>packages </u><u>are kept in the R environment</u>. During installation, R automatically install a number of packages. Later, when additional packages are required for a particular task, they are added.

To learn more about R packages, use the link given
brainly.com/question/26125959
#SPJ4

7 0
1 year ago
Write a program to output the following quote by Edsger W. Dijkstra:
adell [148]

Answer:

#include<iostream>

using namespace std;

main(){

cout<<"\*Computer Science is no more about computers \n than astronomy is about telescopes"<<endl;

}

Explanation:

using c++

5 0
2 years ago
Read 2 more answers
If you created a variable called name, what data type would that value be?
NNADVOKAT [17]
<h2>Answer:</h2>

<h2>A float</h2>

Hope it helps

6 0
3 years ago
Read 2 more answers
Write a public static method named insert. The insert method should have the signature insert(String[] words, String newWord, in
Mumz [18]

Answer:

Explanation:

The following code was written in Java and performs the exact requirements listed in the question. It has also been tested by the runner code and works perfectly.

public static boolean insert(String[] words, String newWord, int place) {

               if (place > words.length) {

                   return false;

       } else {

                   for (int x = words.length - 1; x >= 0; x--) {

                       if (place == x) {

                           words[x] = newWord;

                           break;

                       } else {

                           words[x] = words[x-1];

                       }

                   }

                   return true;

               }

   }

5 0
3 years ago
Which computers were the first PCs with a GUI<br> MS-DOS <br> Linux<br> Windows<br> Mac
sergeinik [125]

Answer:

The first computer with a GUI were linux, microsoft and apple.

Explanation:

I think this is right. Hope it helped <3

8 0
3 years ago
Read 2 more answers
Other questions:
  • Steve is proofreading his memo and he notices that he has typed a phrase twice. Steve should _____.
    5·2 answers
  • Because you do not know every possible future use for the data TerramEarth collects, you have decided to build a system that cap
    15·1 answer
  • FREE POINTS JUST ANSWER MY LATEST TWO QUESTIONS PLEASE
    10·2 answers
  • True or false? The History list shows only Web pages you visited during the current computing session. -computer essentials
    7·1 answer
  • so i just went to play forge of empires and when i logged on to it all of my progress was gone and i was so far in to it
    15·2 answers
  • How are people that have a lot of points and Brainliests still be only "Ambitious"? Here's an example:
    12·2 answers
  • What are binary code​
    7·2 answers
  • What type of error occurred with the code below??
    11·1 answer
  • What is incorrect about the following code? Suggest a possible revision of the code to correct the error.
    13·1 answer
  • Would my phone still work if I snapped it in half?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!