Decoding a binary raster GIS file: Vertical Mapper .grd - matlab

Does anyone know of a method to decode this sort binary file. It should have a quite simple structure, a couple of lines of headers and then just grid data. I have the Vertical Mapper software but I want to cut out a step in my modelling process and do everything in matlab??
Any tips are appreciated.
Thanks
Alex

You'll need the Mapping Toolbox for that.

Related

Understanding a code for deep learning NOMA system in MATLAB

I'm trying very hard to understand this code about a Deep Learning-Based NOMA system based in MATLAB. I am really new to MATLAB coding but I really need to understand this entire code as it will help in my school project and I am struggling.
I think as of right now I do not need to know how the mathematical formulas work, but instead, the focus is on what the code is doing and its flow.
This is part of the code in the trainData.m file that I am struggling with right now
Why are the pilot symbols calculated and then replaced right after?
Why is the idx_sc (20) selected to be replaced? What is its significance? Is it the only subcarrier selected for the training of the DL model? Why only that?
This portion of the code in the picture is labeled "generate training data for each class". From my understanding, it is generating OFDM packets for each label, simulating the transmission and reception, and then getting the features and labels for each of the 16 classes. Is that correct?
The code and all relevant function files can be found in the link below.
Please help me understand the code!!! Please! Much thanks!
https://www.mathworks.com/matlabcentral/fileexchange/75478-deep-learning-for-signal-detection-in-noma-systems
To get you started, In lines 91 the code initializes the entire variable as 0. Subsequent lines (92-96) are just replacing pieces of the variable based on the indexing inside the “(…)”

How to Extract part of Image using Matlab

i have not used matlab much, i need to extract the part of Left and Right Coronary Arteries of a heart from a given heart image.
this is my image,
based on morphological operations, this is what i have come up with,
f=imread('heart.jpg');
diam=strel('diamond',19);
line=strel('line',10,90);
linef=imclose(f,line);
line120=strel('line',10,120);
line120f= imclose(f,line120);
bothline=linef+line120f;
diamf=imclose(f,diam);
arterybm=diamf-bothline;
binaryartery= im2bw(arterybm,0);
mask=cast(binaryartery,class(f));
redPlane=f(:,:,1);
greenPlane=f(:,:,2);
bluePlane=f(:,:,3);
maskedRed=redPlane.*mask;
maskedGreen=greenPlane.*mask;
maskedBlue=bluePlane.*mask;
maskedRGBImage=cat(3,maskedRed,maskedGreen,maskedBlue);
subplot(2,3,1);imshow(f);title('Input Image');subplot(2,3,2);imshow(diamf);title('imclose with Diamond Mask');subplot(2,3,3);imshow(bothline);title('imclose with Line 120 and 90 mask');subplot(2,3,4);imshow(arterybm);title('Difference of line and diamond');subplot(2,3,5);imshow(binaryartery);title('Convert to binary image');subplot(2,3,6);imshow(maskedRGBImage);title('Apply mask to input image');
is there any better approach ?
This task is quite a difficult one, worth academic article if you find solution working flawlessly in most cases. My suggestion: search for articles on the topic, and also try "Matlab File Exchange" (http://www.mathworks.com/matlabcentral/fileexchange/). If you are very lucky, someone might have already solved this problem and posted a solution.
Have a look at the Frangi filter (aka ridge-detection filter), it is meant to detect blood vessels.
There is an implementation available on the file exchange:
http://www.mathworks.com/matlabcentral/fileexchange/24409-hessian-based-frangi-vesselness-filter

Visualize data with heatmap like a cell

I'm looking for an algorithm or method, that can visualize/create nice diagram from data. The data has size and quality properties (and there are some categorys). I found out that treemaps/heatmaps are good for that. But I need an extreme solution. Something like a cell.
I have a good example:
https://www.destatis.de/Voronoi/PriceKaleidoscope.svg
Is it possible to generate diagrams like that (with changing data)? Is there an algorithm for that? Where should I look for more information? Is there a program that does something similar to that?
What you want is called a vornonoi treemap. Check out the links on this other stackoverflow post and this paper from SoftVis 2005.
You can make that kind of map via d3.js http://d3js.org/ ,and there is a treemap example http://mbostock.github.com/d3/talk/20111018/treemap.html .

Sample data for testing binary linear classificaion code

I am loking for some sample binary data for testing my linear classifiation code. I need a data set where the data is 2d and belongs to either one of two classes. If anyone has such data or any reference for the same, kindly reply. Any help is appreciated.
I have my own dataset which contain 2 categories of data with 2 features each.
http://dl.dropbox.com/u/28068989/segmentation_mi_kit.zip
Extract this archive and go to 'segmentation_mi_kit/mango_banyan_dataset/'
Alternately if you want something standard to test your algorithm on, have a look at UCI Machine Learning dataset : http://www.ics.uci.edu/~mlearn/
I guess thatz a kind of data you need.

Fuzzy c-means tcp dump clustering in matlab

Hi I have some data thats represented like this:
0,tcp,http,SF,239,486,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,8,8,0.00,0.00,0.00,0.00,1.00,0.00,0.00,19,19,1.00,0.00,0.05,0.00,0.00,0.00,0.00,0.00,normal.
Its from the kdd cup 1999 which was based on the darpa set.
the text file I have has rows and rows of data like this, in matlab there is the generic clustering tool you can use by typing findcluster but it only accepts .dat files.
Im also not very sure if it will accept the format like this. Im also not sure why there is so many trailing zeros in the dump files.
Can anyone help how I can utilise the text document and run it thru a fcm clustering method in matlab? Code help is really needed.
FINDCLUSTER is simply a GUI interface for two clustering algorithms: FCM and SUBCLUST
You first need to read the data from file, look into the TEXTSCAN function for that.
Then you need to deal with non-numeric attributes; either remove them or convert them somehow. As far as I can tell, the two algorithms mentioned only support numeric data.
Visit the original website of the KDD cup dataset to find out the description of each attribute.