Math, asked by vasuclashofclans, 1 year ago


After this command: v = 111:-11:1; how
many elements will v have?​

Answers

Answered by madeducators3
5

Given:

v= 111:-11:1

To Find :

No of elements i n v.

Solution:

This command we use in MATLAB programming.

P = a:b:c

where P is vector whose first element is a last element is c and the gap between any 2 consecutive element is b.

2nd element = a + b

3rd element = a + b + b

The command states that v is a vector whose

1st element  is 111.

last element in v is 1.

The gap between every 2 consecutive elements of v is -11.

2nd element of v vector = 111-11= 100

3rd element of vector v = 100-11= 89

last element is 1.

This is a A.P

first element = 111 last element = 1  common difference = -11

l = a + (n-1)d\\1= 111+ (n-1)-11\\-110= (n-1)-11n = 11

Number of elements in v is equal to 11

Similar questions