15.01.2015 Views

processamento di dati lidar per l'analisi dell'evoluzione ... - CO.RI.STA

processamento di dati lidar per l'analisi dell'evoluzione ... - CO.RI.STA

processamento di dati lidar per l'analisi dell'evoluzione ... - CO.RI.STA

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.2.10 Me<strong>di</strong>a_30min<br />

%--------------function <strong>per</strong> la me<strong>di</strong>a ogni 30 minuti-----------------<br />

function x=me<strong>di</strong>a_30min(A);<br />

[r c]=size(A);<br />

for j=1:c<br />

somma=0;<br />

for i=1:r<br />

s=A(i,j);<br />

somma=somma+s;<br />

end<br />

x(j)=somma/r;<br />

end<br />

4.2.11 Import_density<br />

%--function <strong>per</strong> importare i valori della densità alle varie quote---<br />

function number_density=import_density(<strong>per</strong>corso,file_name);<br />

% <strong>per</strong> poter aprire il file ottenuto dal programma ussa1976 è<br />

% necessario:<br />

% 1)Definire il <strong>per</strong>corso dal quale prendere il file<br />

path = <strong>per</strong>corso;<br />

% 2) Definire il nome del file<br />

filename=file_name;<br />

% 3) Concatenare <strong>per</strong>corso e nome<br />

file_<strong>dati</strong>=[path,'\', filename];<br />

% 4) Aprire il file<br />

fid=fopen(file_<strong>dati</strong>,'r');<br />

% 5) Importare i <strong>dati</strong><br />

<strong>dati</strong>=textscan(fid,'%f','headerlines',1);<br />

% i <strong>di</strong>versi valori della densità alle varie quote sono:<br />

d=<strong>dati</strong>(:,1);<br />

dens=d{:};<br />

number_density=dens(1:end);<br />

% 6) Chiudere il file<br />

fclose(fid);<br />

107

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!