Code covered by the BSD License  

Highlights from
Calculate size

4.5
4.5 | 2 ratings Rate this file 22 Downloads (last 30 days) File Size: 1.39 KB File ID: #34754

Calculate size

by

Santosh Kasula

 

CALCULATESIZE calculates the size of a MATLAB file for use in the game Cody

| Watch this File

File Information
Description

CALCULATESIZE(FILENAME) determines the number of nodes in the parse tree associated with the file FILENAME for use in the game Cody. For more information on Cody, refer to http://www.mathworks.com/matlabcentral/about/cody/

Required Products MATLAB
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
12 Dec 2013 George Berken

George Berken

function y = nearZero(x)
y = [];
w = [x(2) x x(end-1)];
J=0;
for I = 2:(length(w)-1)
if ((w(I)~=0)&&((w(I-1)==0)||(w(I+1)==0)))
J = J + 1;
v(J) = w(I);
end
end
y = max(v');
end

Comment only
08 Nov 2013 Jeevan Thomas

Jeevan Thomas

 
09 Mar 2012 AMITAVA BISWAS

AMITAVA BISWAS

 
10 Feb 2012 Aurelien Queffurust

Aurelien Queffurust

size of calculateSize.m is 21 ;)

One comment : I would not use the size variable as output of this function since size is a MATLAB function name .

Comment only

Contact us