diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /45/DEPENDENCIES/noof.sci | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '45/DEPENDENCIES/noof.sci')
-rwxr-xr-x | 45/DEPENDENCIES/noof.sci | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/45/DEPENDENCIES/noof.sci b/45/DEPENDENCIES/noof.sci new file mode 100755 index 000000000..126e1d8c0 --- /dev/null +++ b/45/DEPENDENCIES/noof.sci @@ -0,0 +1,10 @@ +function res=noof(a) // this function returns the no of 1's in the given matrrix
+ res=0;
+ for i=1:max(size(a(:,1)))
+ for j=1:max(size(a(1,:)))
+ if(a(i,j)==1)
+ res=res+1;
+ end
+ end
+ end
+endfunction
\ No newline at end of file |