10.07.2015 Views

Finding Potential Sites for Small-Scale Hydro Power in Uganda: a ...

Finding Potential Sites for Small-Scale Hydro Power in Uganda: a ...

Finding Potential Sites for Small-Scale Hydro Power in Uganda: a ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

endendif height>=20;%if the accumulated height difference is greater/equal to 20 meters-><strong>for</strong> n=1:10;%loop from 1 to ten.output((height_value(n,1)),(height_value(n,2)))=1;%gives the matrix "output" a value of one at the coord<strong>in</strong>ates%correspond<strong>in</strong>g to the coord<strong>in</strong>ates <strong>in</strong> the matrix "height_value".endendendclear('data');%clears the variable "data" from the virtual memory, <strong>in</strong> order to free space%to transpose "output".potential_cells = sum(output(:)>0)%pr<strong>in</strong>ts the number of potential cells.fout=fopen('output.flt','w');%opens/creates the file "output.flt" to write <strong>in</strong>tofwrite(fout,output','float32');%writes the matrix "output" <strong>in</strong>to "output.flt"fclose(fout);%closes the fileexecution_time2=etime(clock,time2)%stop clock 2%f<strong>in</strong>ishedexecution_time3=etime(clock,time3)81

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

Saved successfully!

Ooh no, something went wrong!