The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Build Array

SercoSteveB
Active Participant

What are the contents of Array Out following execution of the VI?

Concat Arrays.png

a) A 1D Array {5,4,3,2,1,1,2,3,4,5}

b) A 1D Array {5,1,4,2,3,3,2,4,1,5}

c) A 2D Array {{5,1,4,2,3},{3,2,4,1,5}}

d) A 2D Array {{5,4,3,2,1}, {1,2,3,4,5}}

Comments
mini09
Active Participant

The answer by looking the VI Snippet is option A.

But the function seems to be a Build in array so I also have my other option on D

StefanoFacchine
Member

Hi everyone,

it cannot be answer since the output of the function is a 1D array and not a 2D one. You can see this by looking at the wire - it would look different for a 2D array.

The correct answer is a)

StefanoFacchine
Member

A side consideration: if I just create an indicator at the output of the Build Array funtion then LV automatically generates a 2D array. To obtain the 1D array it is necessary to select the Concatenate Arrays option by the right-click menu of the function. In this way a 1D array is obtained, with the elements in the order depicted by answer a)

mini09
Active Participant

Dear Stefano Facchinetti I got it. That`s correct now I go with the answer A.

Thats the point should be noted if the question asked in words to Bcz these question most commonly occur in CLAD exam in text format.

Nice work Steve and StefanoFacchinetti

SercoSteveB
Active Participant

Answer: A Nice one guys.

I look at the symbols on the Build Array node, to determine if we are concatenating inputs or not. 

If the Build Array node has single blocks depicted on the input terminals, then we are not concatenating the input arrays.

build array non cat.png

If the Build Array node has double blocks depicted on the input terminals, then we are concatenating the input arrays.

No Concat Arrays.png

ashwinilele
Member

A

skian
Member

A