Hi,
I have a problem using r.in.mat.
After saving the an array [275x484 double] in Matlab (save elev.mat elev -v4),
I use in GRASS: r.in.mat input=/media/disk/elev.mat output=elevmat --overwrite
I get this error:
"skipping unknown array 'elev'
ERROR: No 'map_data' array found in </media/disk/elev.mat>"
Ok, I would understand that a matlab struct is expected (the same as we can get from r.out.mat).
But saving of the struct is not supported in format Matlab 4 (-v4):
">> save bourkymat.mat bourky -v4
Warning: Variable 'bourky' of class 'struct'
cannot be saved to a MATLAB 4 MAT-file because of its class.
Skipping... "
How can I use the r.in.mat then?
Thank you for help.
Regards,
Stanislav Bek
Hi,
The matrices have to be named precisely as:
-%<--
Specifically, the following array variables will be read:
* map_data
* map_name
* map_title
* map_northern_edge
* map_southern_edge
* map_eastern_edge
* map_western_edge
Any other variables in the MAT-file will be simply skipped over.
-%<--
as it is written in the manual
(http://www.grass.itc.it/grass64/manuals/html64_user/r.in.mat.html)
so just name the matrix "map_data", define an double array with one
entry as "map_northern_edge", "map_southern_edge"... and a string
"map_name" with the desired map-name.
Hope, that solves it:
Ok, I would understand that a matlab struct is expected (the same as we can get from r.out.mat).
But saving of the struct is not supported in format Matlab 4 (-v4):
Greets,
Achim