Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

read many matrices

Status
Not open for further replies.

peter2

Civil/Environmental
Nov 10, 2004
11
hi everybody.
i'm new on this forum, and almost new on mathcad.

i'd like to know if there's the possibility to read from a formatted ascii file (output of a fortran program) containing a high number of martices. i'd like to make an animated bar plot containing those values. i have noproblem in doing it with ONE matrix with the "read form file" component.
the file is formatted like this

1 2 3
4 5 6
7 8 9

10 11 12
13 14 15
16 17 18

ecc ecc

thanks a lot
peter form italy
 
Replies continue below

Recommended for you

The simplest thing is probably to read in the whole thing as a single matrix and then use submatrix to extract the smaller matrices; should work well if they're sized the same.



TTFN
 
Or you could suck the data into something like Excel, divide up the matrices there using Excel's functionality, and use the automation components to get the matrices from Excel into Mathcad.


Bung
Life is non-linear...
 
for irstuff:
the output can have up to 20000 matrices
(dimension 100 X 100).
do you think it would stil be possible to do what you are saying? how?

for bung:
actually i was looking for a complete automatica program (wich can possibly export a .AVI file)....too much?

thank you very much everybody.

any other suggestion?

peter
 
i made it.
thank you irstuff.... i used your method and works fine....

do you know to force mathcad to continue reading the matrix even after a blank line in the input file?

do you think mathcad will hang if i use a too big file?

thanks again

peter
 
not sure about the first Q.

there are limits to Mathcad's ability to handle matrices, at least with the older versions, beyond that of just having enough memory.

TTFN
 
form mathcad help:
"The effective array size limit depends on the memory available on your system. Approximately 8 bytes of memory are needed per array element. For most systems, the array limit is at least 1 million elements. In no system is it higher than 8 million elements."

i think it will be enough...
bye

PS i will post my solution to the problem later(if anyone's interested...)
 
I defined my matrix as (i
FRAME:1..kmax
B(FRAME):=submatrix(M,(FRAME-1)*imax,FRAME*imax-1,0,jmax-1)
^
|___ This is a subscript!

then i put it in a 3d bar plot and it shows me all the matrices like an animation but not fluid (i'ev fixed my axes limits). when i open the animate dialog box i'm not able to drag the plot into the box and when i click on animate button it says "error initializing video stream".
can anyone help me?
thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor