Hello, i am doing a simulation with the toolkit of epanet for matlab. The code is the following:
run('C:\Users\Alfio Spectre\Documents\MEGA\MEGAsync\5°Anno\Second Semester\materiale\Epanet_Toolkit\start_toolkit');
d = epanet('CASALNUOVO.inp');
numNodes = d.getNodeCount;
allNodeDemandCategories = cell(numNodes, 1);
allNodeBaseDemands = cell(numNodes, 1);
nodeID = d.getNodeNameID(i);
nodeIndex = d.getNodeIndex(nodeID);
numCategories = d.getNodeDemandCategoriesNumber(nodeIndex);
nodeDemandCategories = cell(1, numCategories);
nodeBaseDemands = cell(1, numCategories);
category = d.getNodeJunctionDemandName(nodeIndex, j);
nodeDemandCategories{j} = category;
baseDemand = d.getNodeBaseDemands(nodeIndex, j);
nodeBaseDemands{j} = baseDemand;
allNodeDemandCategories{i} = nodeDemandCategories;
allNodeBaseDemands{i} = nodeBaseDemands;
At least i obtained the vectors allNodeBaseDemands and allNodeDemandCategories but the values inside of them, respectively a numeric value and just a letter value, have been produced as a cell.
For example regarding the vector allNodeBaseDemands i obtain for the first 10 nodes:
1x1 cell
1x1 cell
1x1 cell
1x1 cell
1x1 cell
1x1 cell
1x5 cell
1x1 cell
1x1 cell
1x1 cell
1x2 cell
Considering the last value 1x2 cell, if i open it i obtain:
1x2 cell 1x2 cell
If i open the first cell i obtain:
0.00428099976852536 0.0427980013191700
And those are the values that i would like to see as i instantly open the above vector. Exactly the same is for the other vector.
I've tried to use every single command i could use to convert cell vectors to other types of values, but anything worked. Please help me, im stucked here since 4 days ago...
To run this code you should have Epanet 2.2 installed and my model CASALNUOVO is attached to this post.
The link to install this toolkit is the following: