[Matrix-SIG] Reading and handling matrices

Herbert L. Roitblat roitblat@hawaii.edu
Thu, 22 Apr 1999 18:03:24 -1000


This is a multi-part message in MIME format.

------=_NextPart_000_000E_01BE8CEA.6ADD8190
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi folks,=20
I'm just starting with python and I'm having a few problems, which I =
suspect are rather simple-minded.

1. I was looking for some sparse matrix functions that would let me =
compute the eigen vectors of a rather large matrix in a reasonable =
amount of time.  I have found the eigen value functions in the numeric =
library and I have found some linear algebra routines that allow sparse =
matrices, but I do not see a way to combine these.  I ended up saving =
the matrix as ascii, editing it using word, reading it using excel, and =
then importing it to matlab.  There has to be a better way.

2. After having processed it in matlab, I am having trouble figuring out =
how to get the result back into python.  Does anyone have a routine to =
read matlab *.mat files?  Array has a fromfile method, but I cannot seem =
to make it work.  Once I resize the array (using reshape), the fromfile =
method disappears from the object.  I succeeded in getting something =
read into an array but it was gibberish.  I was reading an ascii file. =20

I have read a couple of the posted tutorials on using matrices, but =
basically I am confused.  I would greatly appreciate a couple of =
pointers to get my head straight.  Thanks for your time.


Herb
Herbert L. Roitblat, Ph.D.
Department of Psychology
University of Hawaii

------=_NextPart_000_000E_01BE8CEA.6ADD8190
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Hi folks, </FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>I'm just starting with python and =
I'm having a=20
few problems, which I suspect are rather simple-minded.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>1. I was looking for some sparse matrix functions =
that would=20
let me compute the eigen vectors of a rather large matrix in a =
reasonable amount=20
of time.&nbsp; I have found the eigen value functions in the numeric =
library and=20
I have found some linear algebra routines that allow sparse matrices, =
but I do=20
not see a way to combine these.&nbsp; I ended up saving the matrix as =
ascii,=20
editing it using word, reading it using excel, and then importing it to=20
matlab.&nbsp; There has to be a better way.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>2. After having processed it in matlab, I am having =
trouble=20
figuring out how to get the result back into python.&nbsp; Does anyone =
have a=20
routine to read matlab *.mat files?&nbsp; Array has a fromfile method, =
but I=20
cannot seem to make it work.&nbsp; Once I resize the array (using =
reshape), the=20
fromfile method disappears from the object.&nbsp; I succeeded in getting =

something read into an array but it was gibberish.&nbsp; I was reading =
an ascii=20
file.&nbsp; </FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I have read a couple of the posted tutorials on =
using=20
matrices, but basically I am confused.&nbsp; I would greatly appreciate =
a couple=20
of pointers to get my head straight.&nbsp; Thanks for your =
time.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Herb</FONT></DIV>
<DIV><FONT size=3D2>Herbert L. Roitblat, Ph.D.</FONT></DIV>
<DIV><FONT size=3D2>Department of Psychology</FONT></DIV>
<DIV><FONT size=3D2>University of Hawaii</FONT></DIV></BODY></HTML>

------=_NextPart_000_000E_01BE8CEA.6ADD8190--