Let A(1:8, -5:5, -10:5) be a three dimensional array. How many elements are there in the array A?
Ans :-
You can find out using MATLAB formula or just simple trick :-
Ans :-
1408
Solution :-You can find out using MATLAB formula or just simple trick :-
1:8
has8-1+1 = 8
elements-5:5
has5--5+1 = 11
elements-10:5
has5--10+1 = 16
elements
So the result is:
The matrix has
8*11*16 = 1408
elements in total.
No comments:
Post a Comment