Select to view content in your preferred language

Importing a best fit curve from Matlab?!

665
5
04-23-2014 12:59 AM
katieclarke
Emerging Contributor
Hey All,

So, I have created a best fitting curve in Matlab (R2012a), and I have the code for it but I need to import it somehow into ArcGIS (using Arcmap10). My aim is to then use the surface volume tool to be able to calculate the volume of my DEM above the imported best fit plane from Matlab.

I am pretty stuck, since I am also rather new to both Matlab and this type of process in ArcGIS. Any ideas would be most welcome.
Thanks in advance,
Katie

p.s if you need any more info just buzz, not sure what I need to give in order for people to be able to help me.
Tags (2)
0 Kudos
5 Replies
MarcoBoeringa
MVP Regular Contributor
I think the easiest way to do this, is to simply export the "best fit surface" from Matlab as a physical entity, that is, as a raster or grid stored to disk in a format ArcGIS for Desktop can read, instead of trying to re-create the surface in ArcGIS based on the formulas alone.

Although ArcGIS has some new features in the direction of using parameterized, formula based, raster processing for display purposes (see "What are the functions used by a raster or mosaic dataset?"), ArcGIS still heavily relies on physical datasets for processing and analysis.

You might be able to use the display functionality to "fake" a Matlab "best fit surface", but I have to little experience using this new funtionality of ArcGIS to guide you or to tell you if it is actually possible (I guess it might involve first using a Constant function to create some level surface, than apply your Matlab fit). Maybe someone else with more experience using this could guide you.

You probably should also look at the Raster Calculator (Spatial Analyst)
0 Kudos
katieclarke
Emerging Contributor
I think the easiest way to do this, is to simply export the "best fit surface" from Matlab as a physical entity, that is, as a raster or grid stored to disk in a format ArcGIS for Desktop can read, instead of trying to re-create the surface in ArcGIS based on the formulas alone.

Although ArcGIS has some new features in the direction of using parameterized, formula based, raster processing for display purposes (see "What are the functions used by a raster or mosaic dataset?"), ArcGIS still heavily relies on physical datasets for processing and analysis.

You might be able to use the display functionality to "fake" a Matlab "best fit surface", but I have to little experience using this new funtionality of ArcGIS to guide you or to tell you if it is actually possible (I guess it might involve first using a Constant function to create some level surface, than apply your Matlab fit). Maybe someone else with more experience using this could guide you.



OK, I guess the problem I'm having is actually exporting the curve. Do you know how to do this if i'm using cftool?
0 Kudos
MarcoBoeringa
MVP Regular Contributor
OK, I guess the problem I'm having is actually exporting the curve. Do you know how to do this if i'm using cftool?


This is starting to become more of a Matlab question, than ArcGIS, you might consider posting on a MathWorks forum (*). Although I have worked with a number of hydrologists using Matlab some 15 years ago, that is way to long ago to guide you.

(*) just noticed you already did this 😉

By the way, I don't know what your data is, but you may wish to have a look at Geostatistical Analyst. It may actually be able to provide a better, and more statistically sound, surface "fit" / interpolation, than Matlab has on offer. It has great functionality for exploratory data analysis, and cross validation to ensure you aren't producing nonsense. Of course, this does assume your data is suitable for interpolation (e.g. smooth continuously varying data), but the exploratory data analysis step will pretty much tell you that.
0 Kudos
katieclarke
Emerging Contributor
This is starting to become more of a Matlab question, than ArcGIS, you might consider posting on a MathWorks forum (*). Although I have worked with a number of hydrologists using Matlab some 15 years ago, that is way to long ago to guide you.

(*) just noticed you already did this 😉


Ha yep! Thought it might be a bit of a long shot on here...no matter, will try MathWorks again.
Cheers
0 Kudos
MarcoBoeringa
MVP Regular Contributor
Ha yep! Thought it might be a bit of a long shot on here...no matter, will try MathWorks again.
Cheers


See my last remark about Geostatistical Analyst in the edited post above that you may have missed.

And actually, it is not that long of shot. I am actually a little bit "stumped" by the apparent lack of interoperability 15 years onwards. At least Google and searching on the MathWorks website, did not turn up any real straightforward way to exchange raster data between the two platforms. The ArcGIS for Desktop Help seems also void of references to Matlab...
0 Kudos