{"id":16512931,"url":"https://github.com/daskol/libmatfile","last_synced_at":"2026-04-17T04:04:44.365Z","repository":{"id":88392995,"uuid":"117450402","full_name":"daskol/libmatfile","owner":"daskol","description":"Library to load and create mat-files.","archived":false,"fork":false,"pushed_at":"2018-01-22T21:24:09.000Z","size":537,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-26T13:45:50.277Z","etag":null,"topics":["c","file-format","lib","mat-files","matlab"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daskol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-14T17:17:06.000Z","updated_at":"2018-01-19T23:11:05.000Z","dependencies_parsed_at":"2023-03-13T18:24:55.755Z","dependency_job_id":null,"html_url":"https://github.com/daskol/libmatfile","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":0.09999999999999998,"last_synced_commit":"139edeb7b2f1ccc0707be8467745da0274d5d457"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/daskol/libmatfile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daskol%2Flibmatfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daskol%2Flibmatfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daskol%2Flibmatfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daskol%2Flibmatfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daskol","download_url":"https://codeload.github.com/daskol/libmatfile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daskol%2Flibmatfile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31803790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","file-format","lib","mat-files","matlab"],"created_at":"2024-10-11T16:06:39.959Z","updated_at":"2026-04-17T04:04:44.351Z","avatar_url":"https://github.com/daskol.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libmatfile\n\n*load from and save to mat-files*\n\n## Overview\n\n**libmatfile** is C library which allow to load array and matrices from or\nstore them into mat-file. This library was separated as isolated module during\n[cutt](https://github.com/daskol/cutt) project development. It is implemented\nspecification of MAT-file format according to\n[documentation](doc/matfile-format.pdf).\n\nAt the moment all features are not implemented yet. The list of capabilities\nand their readiness is placed bellow.\n\n- [x] Simple file loader.\n- [ ] Streaming file loading.\n- [ ] Simple file saver.\n- [ ] Streaming file saving.\n- [ ] Memory map support for large files.\n- [ ] C++ wrapper and bindings to other languages if needed.\n- [ ] MAT-file Level 4 support.\n- [ ] Coverage and unit testing.\n\nThe list is not filled completely yet since library is under development and\nnot all API routines are stable.\n\n## Usage\n\nSuppose there is a mat-file which contains at least one matrix. The matrix is\nThe matrix is Hilbert if the following holds.\n\n![Definition of Hilbert matrix.](doc/hilbert.png)\n\nMaybe the matrix is adjacency matrix of social graph or item-feature matrix of\nrecommender system. In either case, we need to load the matrix and perform some\ncalculations.  There is an example of how to archive these things below.\n\n```c\n#include \u003cmatfile/matfile.h\u003e\n\nmatfile_t *mat = matfile_read(\"arrays.mat\");\nconst char **varnames = matfile_who(mat);\n\nfor (unsigned i = 0; varnames + i != NULL; ++i) {\n    printf(\"[%03d] variable %s\\n\", varnames + i);\n}\n\nfree((void *)varnames);\n\nmatfile_array_t *array = matfile_get_array(mat, \"hilbert\");\nmatfile_destroy(mat);\n```\n\n## Assembling\n\nThe build system used by libmatfile is CMake which is natural for C/C++\nprojects. In order to build release version one should run the following\ncommands in shell.\n\n```bash\nmkdir build\ncd build\ncmake ..\nmake\n```\n\nAfter compilation `libmatfile.a` or `libmatfile.so` depending on desired\nlinking mechanism appears in build directory. Moreover, there is doxygen\ndocumentation in `doc/html/index.html` relative to build directory as well.\nSee details in [CMakeLists.txt](CMakeLists.txt).\n\n## Documentation\n\nOn default documentation is built with library. One can control doc generation\non uild with `DOXYGEN_HTML`. The following code snippet shows how to disable\nHTML documentation output.\n\n```bash\ncmake .. -DDOXYGEN_HTML=OFF\n```\n\nThe latest documentation is already generated and the online version is\nprovided [here](https://daskol.xyz/doc/daskol/libmatfile).\n\n## Testing\n\nSimilar to documentation generation tests are built on default. There is\nbuilt-in option `BUILD_TESTING` which controls adding testing targets to\nglobal target.\n\n```bash\ncmake .. -DBUILD_TESTING=ON\nctest  # or for more verbosity ./matfile-test\n```\n\nThe previous commands force building tests and run `ctest` for brief output.\nThe testing is based on top of Google Test framework so executable\n`matfile-test` produces more detailed output that could be usefull for\ndevelopers.\n\n## Credits\n\n\u0026copy; Daniel Bershatsky \u003c\u003cmailto:daniel.bershatsky@skolkovotech.ru\u003e\u003e, 2018\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaskol%2Flibmatfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaskol%2Flibmatfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaskol%2Flibmatfile/lists"}