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:8has8-1+1 = 8elements-5:5has5--5+1 = 11elements-10:5has5--10+1 = 16elements
So the result is:
The matrix has
8*11*16 = 1408 elements in total.
No comments:
Post a Comment