summaryrefslogtreecommitdiff
path: root/48/DEPENDENCIES/noof3.sci
blob: d41b0b49a515ddd80db10a02076f77b9adbd9cf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//finds the number of z's in the 3 dimensional matrix A
function res=noof3(a,z)
    res=0;
    for i=1:max(size(a(:,1,1)))
        for j=1:max(size(a(1,:,1)))
            for l=1:2
                if(a(i,j,l)==z)
                    res=res+1;
                end
            end
        end
    end
endfunction