Sign in to PrePAN

Data::MATFile read the MATLAB MAT-File format



my $stuff = read_matfile ('something.mat');
my $array = $stuff->{data}->{name}->{array};


Provide a way to directly access a MATLAB MAT-File from Perl.

I'd appreciate input from MATLAB users on how the data should best be represented in Perl.

At the moment it is rather hair-raising stuff:

 my $x = read_matfile ('x.mat');
 my $value = $x->{data}->{"name-of-data"}->{array}->[0][1][2];

But I don't know what would be better, or if this is the best possible option.

Also I'm interested in getting feedback as to how useful this would be, whether it is worth bothering with the endian-ness issues and complex matrices which form part of the MAT-File format.


Please sign up to post a review.