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
Format character of Date function that display the day of the month in 2 digits with leading zeros such as 01 to 31
JulsSmile [24]

Answer:

b.d

Explanation:

The format of the outputted string format totally depends upon the string format character according to the question the answer is format charatcer d.

It represents the day of the months in 2 digits in numerical format with leading zeroes.

L represents whether the year is a leap year or not.

D represents the days of the month in textual format with three characters like Sun for sunday.

j It represents the days of the month without leading zeroes.

5 0
3 years ago
There is always this thing that comes out and I can't answer one's question. How do I undo this?
Y_Kistochka [10]
You should enter your email address
8 0
3 years ago
Read 2 more answers
How do you return a value from a function?
rjkz [21]

Answer:

return instruction used to return a value from a function.

Explanation:

Function is a block of statement which perform the special task.

Syntax for define a function:

type name(parameter_1, parameter_2,...)

{

  statement;

return variable;

}

In the syntax, type define the return type of the function. It can be int, float, double and also array as well. Function can return the array as well.

return is the instruction which is used to return the value or can use as a termination of function.

For return the value, we can use variable name which store the value or use direct value.

4 0
3 years ago
A(n) ________ software installation enables you to decide which features you want to install on the hard drive
Mazyrski [523]
<span>An element in the Excel window that displays the value or formula contained ... which you can specify the type of calculation you want to perform in an Excel formula are: ..... installs all the most commonly used files to your computer's hard drive. Full. A(n) ______ software installation enables you to decide which features you ...</span><span>
</span>
5 0
3 years ago
Who is the author of computer programming pdf
mash [69]
Donald Knuth<span> began the project, originally conceived as a single book with twelve chapters, in 1962.</span>
5 0
3 years ago
Other questions:
  • When you schedule an appointment, Outlook adds the appointment to the ____ folder by default.
    9·1 answer
  • Multiple choice
    9·2 answers
  • When a Firewall is a hardware interface, it is referred as a
    6·1 answer
  • Which of the following access control techniques allows the user to feel empowered and able to change security attributes?
    5·1 answer
  • A computer essentially takes input, processes it, and produces output. Which person developed a machine in the mid-1880s that ac
    6·1 answer
  • You are a Data Scientist at Anthem Blue Cross Blue Shield. You want to check if a patient will develop diabetes. Please write th
    5·1 answer
  • PLEASE HELP AND FAST!!!!!<br>Which of the following devices uses binary code?
    6·2 answers
  • I’ll mark brainlest
    14·2 answers
  • Will give brainliest
    10·1 answer
  • Convert the decimal number 164 into the equivalent 8 bit binary number. ​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!