saving as CSV, eigensystem



Question 1.

Something like the following might work

(C1) cvs(e,[c]) := block([i,n],
   if listp(e) or matrixp(e) then (
     e : args(e),
     n : length(e),
     for i : 1 thru n do (
       cvs(inpart(e,i),is(i<n))))
  else if c = [true] then print(e,",") else print(e))$

(C2) cvs([u,n,k]);
u , 
n , 
k 
(D2)                                         DONE
(C3) cvs([5,6,[[7]]]);
5 , 
6 , 
7 

(D3)                                         DONE

Matrices get printed row-by-row; for example

(C4) cvs(matrix([4,5],[6,7]));
4 , 
5 
6 , 
7 
(D4)                                         DONE

To print to a file, use the function with_stdout; for example
to write to a file  "l:/testcvs.txt" (I'm using windows, so "l" 
is a drive identifier) use

(C5) with_stdout("l:/testcvs.txt",cvs([1,2,3,4,5]))$
(C6) 

The file "testcvs.txt" looks like

1 , 
2 , 
3 , 
4 , 
5 
I wrote cvs quickly; it might do what you want, but it may 
(probably does) have bugs. Somebody might like to write a 
well-thought-out replacement for my cvs and make it a 
standard Maxima function.

Question 2.

I'm unaware of a good numerical eigenvalue function for Maxima; 
I think it's something we desperately need.


Regards,

Barton




kamano <kamano@affrc.go.jp>
Sent by: maxima-admin@math.utexas.edu
09/08/2003 08:50 PM

 
        To:     maxima@www.ma.utexas.edu
        cc: 
        Subject:        [Maxima] saving as CSV, eigensystem


I am a researcher in japanese organization.
My mane is Amano.
I am starting to use maxima.

Question 1 :
Can I save the data (i.e. list,matrix) as CSV format?
Which command should be used?

Queation 2 :
How can I get eigenvalues or eigenvectors as "numeric" (not symbolic)?

_______________________________________________
Maxima mailing list
Maxima@www.math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima