Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Read a .mat file without the use of matlab API
Forum Updated to NodeBB v4.3 + New Features

Read a .mat file without the use of matlab API

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 8.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    harka011
    wrote on 11 Feb 2011, 11:28 last edited by
    #1

    My task is the following:

    I want to read a .mat file, to extract the values of certain variables and plot them on a graph.

    I do not want to use any matlab libraries.

    I am using Qt Creator and programming in C++.

    The file format of the .mat Version 4 file ( the one I want to read ) is available on :

    http://maxwell.me.gu.edu.au/spl/matlab-page/matfile_format.pdf

    A .mat file stores data in binary format. It may contain one or more metrices.

    Anyone who has done something like this succesfully?
    I have experimented alot with streams, qbytearray qfile etc but haven't solved it yet.

    Appreciate the help.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      deimos
      wrote on 11 Feb 2011, 12:01 last edited by
      #2

      I never used matlab API, but into debian repository I see libmatio that could help you.
      The description says:
      "matio is an ISO C library (with a limited Fortran 90 interface) for
      reading and writing Matlab MAT files."

      this is the "link":http://sourceforge.net/projects/matio/ to the project

      regards

      1 Reply Last reply
      0
      • J Offline
        J Offline
        johncc
        wrote on 7 Oct 2011, 18:06 last edited by
        #3

        Hello Deimos,

        While searching for a similar solution, I came across your reply. Just wanted to
        warn that the 'matio' library does not support Matlab level 4 files too well.
        I just tried it out with a simple file I have, a it just didn't work.

        I contacted the author and he indicated he'd rather drop level 4 support (admittedly
        a little old), than patch it up to get it working.

        John

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved