MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: importing mat format doesn't import variable names

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53494] Re: [mg53466] importing mat format doesn't import variable names
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Fri, 14 Jan 2005 08:54:46 -0500 (EST)
  • References: <200501130812.DAA03781@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Could you give us a small example of the file you're trying to import 
(perhaps 3 x 3), including the variable names?

Tomas Garza
Mexico City
----- Original Message ----- 
From: "Ben Barrowes" <barrowes at alum.mit.edu>
To: mathgroup at smc.vnet.net
Subject: [mg53494] [mg53466] importing mat format doesn't import variable names


> This is a very responsive ng. Thanks!
>
> When I Import["file","MAT"] files, the variable name information is
> lost. Is this the normal behavior? Or is there a switch I can specify to
> import the variable names as well?
>
> For example, if file.mat has two variables, foo (3x3) and bar (3x3), and
> I Import it, all I get is 1 nested List for a result.
> {{{foo[[1,1]],foo[[1,2]],foo[[1,3]]},...},{{bar[[1,1]],...}}}
> However, they are simply numbers with no names associated with the list.
>
> I know I could do:
> {foo,bar}=Import["file.mat","MAT"];
>
> but I was wondering if there was a way to Import variable names without
> specifying them explicitly. The information is in the .mat file. Why
> doesn't Mathematica extract it?
>
> Similarly, when I Export a matrix into a mat file, will the variable
> name be lost?
>
> Ben Barrowes
>
> 



  • Prev by Date: Re: List element extraction
  • Next by Date: Re: List element extraction
  • Previous by thread: importing mat format doesn't import variable names
  • Next by thread: Re: importing mat format doesn't import variable names