How can I export a stream network to Excel? #29
-
This is a question that came up in the blog: "Dear wschwanghart, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Well, first of all, please reconsider why you want to have the data in Excel. Ok, you might be more familiar with Excel and its possibilities such as curve fitting, but please note that these are functionalities that MATLAB performs much better.
If your network consists of several rivers then t will contain rows with nans (so-called nan-punctuated vectors) to separate the river network into individual reaches. |
Beta Was this translation helpful? Give feedback.
Well, first of all, please reconsider why you want to have the data in Excel. Ok, you might be more familiar with Excel and its possibilities such as curve fitting, but please note that these are functionalities that MATLAB performs much better.
Still, if you really want to do it, here's how provided that you have a DEM and a STREAMobj S.
If your network consists of several rivers then t will contain rows with nans (so-called nan-punctuated vectors) to separate the river network into individual reaches.
In addition to the x and y coordinates of the network, the above code adds elevations and…