I want to plot a netcdf file in matlab that I have already analyze it as a .mat archive. I have to plot it with a map background with coastlines and degrees of longitude and latitude I want. Can anyone help me?
You could plot your data on a map using the m_map package found here. There's also examples there for reading in netcdf and hdf5 data and using .mat archive should then be straightforward.
Related
I am currently working on a disparity map estimation project in Matlab. I am using the middlebury datasets including ground-truth disparities in PFM format. I don't know how to load this particular format in Matlab. Could anyone help me? Thanks
I have tried a simple load and then read in the documentation that the load function does not support the pfm format.
I have an EEG signal with .cnt and .fdt files. I have to obtain images to use it as input to a cnn. Is it possible to convert the file to images? Someone please help me with this. If possible then specify how to do it.
You should download EEG tollbox such as EEGlab or FieldTrip. I prefer fieldtrip because it is script based while EEGlab is more about GUI. Here you can see fieldtrip's function ft_read_header that can deal with your files, and here is a basic script to read cnt files with fieldtrip functions
How do I train images and make a .mat file?
I am trying the following simple matlab program :
http://in.mathworks.com/matlabcentral/fileexchange/22030-image-retrieval-query-by-example-demo
Documentation
https://ece.uwaterloo.ca/~nnikvand/Coderep/imQuery/documentation.html
Now, this zip package already includes a .mat file which has histograms of all the sample images provided for querying.I want to query over my own sample-set of images.
I figured out that I need that getimagehist function to calculate the histogram and populate a database of my images in .mat format. but how exactly do i do it? I am a newbie in matlab that's why i have no idea. A little guidance/help will be greatly appreciated.
In Matlab, the .mat format is used for saving Matlab workspaces. You can create .mat files with
save(filename,variables)
It is documented here: http://se.mathworks.com/help/matlab/ref/save.html
If you need help in creating the histograms from images, check imhist: http://se.mathworks.com/help/images/ref/imhist.html
As an example of saving a histogram in .mat file
myHistogram = imhist(image);
save('myMatFile', 'myHistogram');
I have a Nifti file, the size of which is 62*62*38. How can I transfer the Nifti file to .mat Matlab file?
Most medical imaging data can be manipulated effectively using some kind of toolbox, such as SPM. However, if you need to gain access to the raw matrix I've always used NIfTI tools from the Mathworks file exchange site (here).
There are two functions that are relevant here: load_nii and load_untouched_nii. The first function load_nii takes care of situations where the header in the NiFTI contains transformations that haven't been applied to the underlying data matrix. If you know that no such transformations exist, you can use load_untouched_nii to avoid the reslicing being done. Both functions return a structure, and the data matrix is located in the img field of the returned structure.
This can read NIFTI as well as many other medical image file types into MATLAB arrays, which you can then save as .mat files.
FreeSurfer has a MATLAB function called "MRIread". It can read NIFTI (.nii, .nii.gz) files into a MATLAB structure, which can then be saved to a MAT file if so desired.
I'm new to matlab as well as LIBSVM. I calculated feature vector for every point stating r,g,b values of point in single vector and stored it in .mat file. Currently I'm having around 420 points and 4 classes viz Red/Green/Blue/Other. Now I want to pass this .mat file to train libsvm and based on that classify the newly arriving test point, whether it is red or blue or green or other. Need not to mention, its a multiclass classification and I don't even know how to deal with it ?
svmtrain(TrainingSet,Groups,'kernel_function','rbf'); where TrainingSet is my 420*4 feature vector set and Groups is class name.
Thanks in advance for help.