[GRASS-user] MATLAB exports

Hi

I am trying to export maps from Grass 7.0.0 running in Linux (64 bit
Ubuntu) using r.out.mat.

Matlab (R2014b), however, complains that these files are corrupt.
(Matlab is also running in Linux.)

Could anyone please advise?

Many thanks, Kevin

On Thu, Nov 6, 2014 at 2:24 AM, Kevin Williams <zs1kwa@gmail.com> wrote:

Hi

I am trying to export maps from Grass 7.0.0 running in Linux (64 bit
Ubuntu) using r.out.mat.

Matlab (R2014b), however, complains that these files are corrupt.
(Matlab is also running in Linux.)

Could anyone please advise?

Hi,

it is possible that r.out.mat supports some older version of these .mat
files which Matlab no longer accepts.

There are some things you can do.

1) Try if you can tell Matlab that it is an older version of the format.
2) Try Octave, perhaps load and save there, then open in Matlab.
3) Try on of the (many) formats provided by r.out.gdal. Can Matlab load
TIFF, for example?
4) Use r.out.ascii (or r.out.xyz) and read the created text file to Matlab
in some way.
5) Fix r.out.mat if you can and submit a patch.

In any case, please share what worked for you.

Vaclav

Many thanks, Kevin

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi

It does not seem possible to tell Matlab it is a v4 file, but (thanks
for the suggestion) Octave has no problem with it.

I can "re-save" it as a new v4 file from Octave, and then Matlab will load it.

Best regards, Kevin

On 7 November 2014 03:19, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On Thu, Nov 6, 2014 at 2:24 AM, Kevin Williams <zs1kwa@gmail.com> wrote:

Hi

I am trying to export maps from Grass 7.0.0 running in Linux (64 bit
Ubuntu) using r.out.mat.

Matlab (R2014b), however, complains that these files are corrupt.
(Matlab is also running in Linux.)

Could anyone please advise?

Hi,

it is possible that r.out.mat supports some older version of these .mat
files which Matlab no longer accepts.

There are some things you can do.

1) Try if you can tell Matlab that it is an older version of the format.
2) Try Octave, perhaps load and save there, then open in Matlab.
3) Try on of the (many) formats provided by r.out.gdal. Can Matlab load
TIFF, for example?
4) Use r.out.ascii (or r.out.xyz) and read the created text file to Matlab
in some way.
5) Fix r.out.mat if you can and submit a patch.

In any case, please share what worked for you.

Vaclav

Many thanks, Kevin
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user