i am using Matlab's webread() function to download openstreetmap osm files.
My goal is to write an application that downloads osm data, parses it in Matlab, then reads out coordinate values and plots them.
Unfortunately, the overall code seems to run pretty slow, and running the profiler showed that most of the runtime comes from using the webread() function, even though the requested .osm are comparatively small (<500kb) and downloaded via Browser within a fraction of the time the function uses.
What can i do to speed up the downloading process? Is it recommended to use the webread function for this task at all? I was also considering downloading the files by using another language/a bash application that can be called from within Matlab.
EDIT: osm data is downloaded as XML file
Related
I am running a classification script in GEE and I have about 2100 training data since my AOI is a region in Italy and have many classes. I receive the following error while I try save my script:
Script error File too large (larger than 512KB).
I tried cancelling some of the training data and it saves. I thought there is no limit in GEE to choose training points. How can I know what is the limit so I adjust my training points or if there is a way to save the script without deleting any points.
Here is the link to my code
The Earth Engine Code Editor “drawing tools” are a convenient, but not very scalable, way to create geometry. The error you're getting is because “under the covers” they actually create additional code that is part of your script file. Not only is this fairly verbose (hence the error you received), it's not very efficient to run, either.
In order to use large training data sets, you will need to create your point data in another tool and upload it (using CSV or SHP files) to become one or more Earth Engine “table” assets, and use those from your script.
The application is a GUI designed with GUIDE with lots of subplots that have an refresh interval approx ~1s adding new data to the time series, for example:
I have read through making-graphs-responsive-with-data-linking, but the efficient linkdata on does not work in standalone applications when exporting with application compiler:
Error using linkdata (line 24)
Plots cannot be linked in deployed applications because linked plots require the MATLAB workspace.
,while refreshdata works but results in heavy load.
What is the efficient way to plot data in real-time, is it still like gnovice suggests here and does this work for standalone's (lacking the workspace) efficiently too?
I also noticed animatedline doc, but dunno
machine: debian 9 x64
Mathworks seems to be working on making better use of GPUs and I am wondering at what stage they are at in R2015. Does it automatically use GPU or do I need to program Matlab somehow to make use of my GPU? I have Nvidia GTX860M and it would be a pity for it to idle away while I sit and wait for Matlab to execute scripts. Do I still need to get an add-on for GPU for Matlab R2015?
If someone is currently using GPU in their Matlab computing, can you post some relevant links with what I have to go to set it up (preferably for R2015, if it makes any difference)? Whenever I search I come across different instructions made for Matlab from R2006 to R2012 and I wonder if they are still relevant for more recent releases.
Does it automatically use GPU?
No, you have to make the decision. Using the gpuArray function you decide to copy the data to the graphic card memory. Any data stored there is processed by the gpu (as long as the function is supported, otherwise you get an error), any data stored in your main memory is processed by the CPU.
For more information how to use it, start reading here http://de.mathworks.com/discovery/matlab-gpu.html
I found mathscript can do this,but it seem too slow.
So I want to use matlab to create a dll file used by labview,but all information I can find just how dll could used in C++,but C++ also must use the .lib file ,I am concerned labview could not use lib. file.
So can I use the .dll in labvew,and how?Is there anyother way to use matlab source code in labview without matlab?
You will need to purchase the MATLAB Compiler which is quite expensive unless you are a student.
You can also call the MATLAB application (if it's installed) using the MATLAB Script Node (which is different than Mathscript) - see here
Another alternative is Python's Numpy which I personally picked up quickly coming from a MATLAB background. If you want to go down that route I can give you further advice on how to integrate with LabVIEW.
Is there anyway to plot my data consisting of lat/lon and some feature values in google map from matlab. I have certain data points having different properties based upon that I want to show like markers with different color/size on google map. Is that possible
Google Maps allows you to import data in the form of a KML file. There are various tutorials available online that show how to perform this import step (here's one that I just quickly found). Also, here is some basic info on KML from google.
So then the only challenge becomes exporting your data from MATLAB into KML form. If you have MATLAB's Mapping Toolbox, then this is extremely easy. Just use the kmlwrite command.
If you don't have the Mapping Toolbox, already, it's probably a good idea to have if you are performing any sort of complex mapping operations (things get pretty complicated when you try to flatten a round globe into a map). If this is just a one-off project and that toolbox is overkill, then you may be able to manually create a KML file by writing XML from MATLAB (either using xmlwrite or going the very manual route of writing with fprintf).
Additionally, I would not be too surprised if Google Maps allows you to import certain data in the form of CSV files (though perhaps this has limitations compared to KML). If so, you can simply make use of csvwrite from MATLAB to export your data (no extra toolboxes required).
==EDIT==
If you'd like to find out how to convert from CSV to KML, this previous SO post might help.
There is the KLM-Toolbox that doesn't require the matlab Mapping Toolbox:
http://www.mathworks.com/matlabcentral/fileexchange/34694
It should do the job.