Question: Construct a VI with one numeric input n that builds an array containing n Fibonacci numbers, beginning with F 1 . Fibonacci numbers are the

Construct a VI with one numeric input n that builds an array containing n Fibonacci
numbers, beginning with F1. Fibonacci numbers are the sequence of numbers, denoted
by Fn, defined by the relation
Fn = Fn-2+ Fn-1
where F1=1 and F2=1. Table 1 shows the values of Fn you should obtain for the first few
values of n (all inputs are positive integers). Your VI should create this table.
n Fn
11
21
32
43
55
68
713
821
934
1055
This one is a bit tricky, so before deciding what type of loop to use, you may want to
consider an important difference between For Loops and While Loops. A While Loop always
executes at least once because the VI checks the conditional terminal at the end of each loop
iteration. However, a For Loop does not possess this attribute; if a value less than one is wired
to the Count terminal, the For Loop will not execute. Keep this in mind when initializing the
output array and use shift registers to initialize your array. Consider carefully how to construct
your VI so that your output array is accurate for n =1 and n =2, as well as the values computed
using the formula. Save your VI as Name Lab1ProbSetB - P3.vi

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!