File Exchange

image thumbnail

Sand Sieve Analysis (SANDY)

version (74.5 KB) by Gar
Script that allows you to know the main parameters of a sand sieve analysis


Updated 31 Mar 2017

View License

Sand Sieve Analysis
1. With this routine you can get the sand sieve analysis. Routine displays the computation of the particle-size distribution in different windows. Moreover, you can get the main parameters of statistics analysis: percentiles, mean, standard deviation, kurtosis, etc.
2. Inputs:
Instructions are on the code.
3. Outputs
Graphs of:
Frecuency Curve.
Cumulative Arithmetic Curve.
Cumulative Probability
Arithmetic Curve.
Cumulative Probability
Semi-Log Curve.
Cumulative Probability
Logarithmic Curve.
D5, D10, D16, D25, D30, D50,
D60, D75, D84, D95.
Mean grain size.
Standard Deviation.
Coefficient of curvature.
Coefficient of uniformity.
Qualitative sediment
distribution ranges for
standard deviation, skewness
and kurtosis.
ASTM, USCS and Wentworth's
Ruiz-Martinez, G., Rivillas-Ospina, D., Mariño-Tapia, I., Posada-Venegas, G. (2016). SANDY: a Matlab tool to estimate the sediment size distribution from a sieve analysis. Computers & Geosciences. 92, July, pp.104-116. DOI: 10.1016/j.cageo.2016.04.010.
Author: Gabriel Ruiz Martinez, Civil Engineer.
June 2016

Cite As

Gar (2020). Sand Sieve Analysis (SANDY) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (32)

errors for me. is there a demo data set?

Has anyone tried this with pebble count data, not mass via sieves?

I tried running this script but it gives me error at line 66 @Gar

error in Sandy1_75 (line 66)


Guys, you candownload the Sandy script and test samples in:


@Duncan Wright. Hi, I have fixed this bug. Please download Sandy_1_75. Thank you

Are any other stats packages required? I get the error:

Undefined function or variable 'idp'.

Error in Sandy (line 153)
wer = find(idp==2);

Error in run (line 96)
evalin('caller', [script ';']);

After running in data folder..

Is there any way to avoid the graphs being directly exported as metafile images? I would like to get them in matlab.


@Chaudhry: the example files you can find them in GitHub on the Sandy_paper repository.


Can you please send an example on which i will run this? it will be great help. Thanks


It is a wonderfull tool.

am notable to download the file

FJ Way

Can the author supply a little more information on the calculations? I have compared results with another 'method of moment' software and found some differences in the results. Thanks.


Hello Gabriel! I have a question, it's posible to use your rutine with images rgb? or gray images?

Jeff Tuhtan

Ruby Bernal

how open the file?, is .m file and how run the software?

heiko hertel

gggg gggggggg

elkadu prog

Derf Uwe

For me it's ok, I think that if we wanted to improve the script, we could do it. It's true this script need some changes, but C'mon we can't expect that every script that we find, it solves exactly our problems.

sundar naga

i want to do more no of samples ,i think it is very useful to me

Vaani Ram

cant download.. can anyone help..plz!

paul powers

I AGREE. Download happens but NO .exe file

Arun Arulanantham

Canot down load the Exe file

Sunil Gaikwad

for academic purpose

seref keskin

yp wang

I find it works well by just commenting out the line 22.

yp wang

I think this program is very nice. However, it doest'w work in Matlab7 SP2. Could you fix this problem? Thanks.

Daniel López Sánchez

Christine Williams

If using Mac OS X you'll need to modify directory paths specified in the m-files - the m file code specifies directory separators as backward slashes (\) and Mac OS X uses forward slashes (/). Simply look for the directory specifications and modify.

If you are using the default screen resolution you'll also need to modify lines 22 and 23. Comment out line 22 and for screen resolution of 1280x854 make line 23

vpan = screen(1,4)-120; hpan = screen(1,3)-250;


saeed khorram

Gabriel Ruiz M

If you have a 1024 x 768 screen, you must put a comment in the line (22) or delete the line:
screen = screen - 256;

iceberg achuyth

excellent job boss


When multiple samples are analyzed, a C-M diagram is plotted. Fix a bug related to the name function.

Bug related with the names of the main and subfunction was fixed.

The results are exported a txt file.

All the routine was renewed, the phi scales was added to the plots, new parameters can be computed. The routine has the capability to one multiple samples.

Now, the user only has to do, it's to create a variable with the name "Granulometria" and inside this variable. I fixed an enormous bugs.

Now,the routine enables to the user gives whatever value of density.
The routine displays a window in which the user can choose what kind of plot to want to see.
It is opened the range of values the user can load since Granulometria.txt.

I added a pie plot and reviewed some parameters.

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux