Is there any way to convert AMPL file to GAMS - type-conversion

There is convert functionality provided by the Gams to convert gams file into other file formats, likewise is there any way to convert ampl file into gams format. Or if there is no way exist for the conversion directly, so is there any indirect way for the ampl to gams conversion.

Related

use matlab to handle pajek .net file?

I have a .net file which is in pajek format. Now I was thinking to use matlab to do the analysis of the data in this file. After searching online, I found a toolbox in matlab with name SBEToolbox. Considering installing this toolbox to the matlab might be a bit time-consuming, since I do not have administrative access to my pc currently. Do you have any better idea to use matlab with pajek .net file? Many thanks for your time and attention.

Read HDF5 files compressed with SZIP in Matlab

I have some results generated from a legacy Fortran program, that write compressed dataset utilizing SZIP compression. I would like to read them in matlab. Unfortunately the matlab HDF5 does not support SZIP compression.
Does any of you have any idea on how to solve this issue?
Thanks in advance
AR

How to transfer Nifti file into .mat Matlab file?

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.

extracting an output matrix from matlab

I am working on a small iris recognition system using matlab, my matlab code after several steps and algorithms gives me a 9600 bit matrix as an output, and I was wondering how can I take this matrix to process it using a Windows Forms application using C#?
There are some standard formats that you can work with them both in MATLAB and C#.
For example, you can use csvwrite function in MATLAB to save it as a comma-separated value file. The in C# there are standard ways to read a csv file. Here it is discussed how to read a CSV file in C#.
Another option is to save in a .txt file and read it in C#. HDF5 files are another type that are supported with some libraries in both (see here). You can even save your file as a regular .mat file and load it in C# using a specific API (discussed here)

View HDF5 inside matlab

Just how good is MATLAB in opening and viewing HDF5 files? I can see there are a couple of h5... commands but I'm wondering if there is a way to "view" the file interactively as you could do with a .mat file or like HDFView tool?
We use Matlab and we use HDF5 files. We also use a lot of Fortran, and one of the reasons we use HDF5 is to store datasets which can be read and written both by Fortran and Matlab. Matlab vs Fortran for HDF5 is a bit like Matlab vs Fortran for most things, the former is easier to use, lets you try out ideas quickly, and gives you much tighter integration between data and visualisation. You may have your own views on Matlab vs your favourite compiled language.
Matlab provides a complete (maybe not entirely complete, but we haven't found any features of the HDF5 Fortran APIs that we want to use that Matlab doesn't provide) interface to HDF5. When you view the document that #GuntherStruyf pointed you at, read to the bottom where you can find information about Matlab's low-level HDF5 access functions. You can do a lot with the high-level access functions alone, but not everything. And if you are already used to the HDF5 API for Fortran/C/C++, taking the same approach in Matlab and ignoring the higher-level functions is easy enough.
But we do use HDFView too, it's an easy way to trawl through an HDF5 file and, within certain limitations, an easy way to quickly edit an HDF5 file. You can, for instance, cut and paste from Excel to HDFView; perhaps more relevant you can cut and paste from Matlab's variable editor. Matlab doesn't quite provide that level of easiness for viewing HDF5 files.
To sum up:
HDFView for viewing and interactive editing
Matlab for programming for prototyping and rapid deployment
Fortran/C/C++ for programming for heavy-lifting.