View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Calculate size

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

4.7 | 3 ratings Rate this file 21 Downloads (last 30 days) File Size: 1.39 KB File ID: #34754 Version:

Calculate size


Santosh Kasula (view profile)


24 Jan 2012 (Updated )

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

| Watch this File

File Information

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

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 (6)
06 Jul 2016 yao gang

Could you give an example to explain how to use this funtion?I have no idea how to deal with functions with input arguments.Always has errors.Thank you.

Comment only
12 Feb 2015 Brad

Brad (view profile)

12 Dec 2013 George Berken

function y = nearZero(x)
y = [];
w = [x(2) x x(end-1)];
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);
y = max(v');

Comment only
08 Nov 2013 Jeevan Thomas  
09 Mar 2012 AMITAVA BISWAS  
10 Feb 2012 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
01 Sep 2016

Updated license

Contact us