Library for reading mat files into gsl structures and standard types of C data
- zlip - mingw64/mingw-w64-x86_64-zlib 1.2.13-3 Compression library implementing the deflate compression method found in gzip and PKZIP (mingw-w64)
- gsl - GNU Sciencific Library 2.7
- One parameter per one mat file
- Works with matrices of size AxB
gsl type | matlab type |
---|---|
double | double |
int | int |
complex double | complex double |
gsl_vector | double vector |
gsl_vector_int | int vector |
gsl_vector_complex | complex double vector |
gsl_matrix | double matrix |
gsl_matrix_int | int matrix |
gsl_matrix_complex | complex double matrix |
#include "i_mat.h"
int main(int argc, char const *argv[])
{
IMatError mError;
// vector
gsl_vector *S_test = openMatVector("S.mat", &mError);
if (mError.isErr)
{
printf("\nS_test: %s", mError.stringErr);
}
else
{
printf("\nS_test: %d элементов", S_test->size);
}
// int
int a = openMatInt("k.mat", &mError);
if (mError.isErr)
{
printf("\na: %s", mError.stringErr);
}
else
{
printf("\na: %d", a);
}
}