Code covered by the BSD License  

Highlights from
getwdsdata.m

4.0

4.0 | 4 ratings Rate this file 3 Downloads (last 30 days) File Size: 104.76 KB File ID: #15502

getwdsdata.m

by Philip Jonkergouw

 

05 Jul 2007 (Updated 05 Jul 2007)

Get water distribution system data from an EPANET input file

| Watch this File

File Information
Description

Syntax

[x] = getwdsdata(wdsfile, code)
[x] = getwdsdata(wdsfile, code, id)
[x,t] = getwdsdata(...)

Description

[x] = getwdsdata(wdsfile, code) returns static water distribution system data for all nodes/links from an EPANET 2 input file. The type of data is specified by the epanet 'code'.

[x] = getwdsdata(wdsfile, code, id) returns static water distribution system data for the nodes/links specified in cell array of strings 'id' from an EPANET 2 input file.

[x,t] = getwdsdata(...) returns dynamic water distribution system data with the time steps from an EPANET 2 input file.

Example

[cl, t] = getwdsdata('Net1.inp', 'en_quality', {'2', '12'})

MATLAB release MATLAB 6.5 (R13)
Other requirements Zip contains epanet2.dll and header file.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
25 Oct 2007 Herbert Obiri  
12 Mar 2008 Syed Imran

A much needed utility for researchers using the EPANET toolkit with Matlab. This probably saved a month of start-up time for me.
More documentation or comment lines would go a long way.

08 Jul 2008 Ndilokelwa Luis

There are some codes that do not work with the program

17 Apr 2009 Demetrios Eliades

In some computers the code does not run, due to a missing filename in line 81:
[errorcode] = calllib('epanet2', 'ENopen', wdsfile, '', '')

By changing to
[errorcode] = calllib('epanet2', 'ENopen', wdsfile, 'tmp.$$$', '')
everything works OK.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
simulation Philip Jonkergouw 22 Oct 2008 09:18:20
epanet water distribution system model Philip Jonkergouw 22 Oct 2008 09:18:20

Contact us at files@mathworks.com