×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

read many matrices

read many matrices

read many matrices

(OP)
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

RE: read many matrices

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

RE: read many matrices

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...

RE: read many matrices

(OP)
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  

RE: read many matrices

(OP)
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

RE: read many matrices

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

RE: read many matrices

(OP)
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...)

RE: read many matrices

(OP)
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

RE: read many matrices

(OP)
noone can?
.....

RE: read many matrices

If you post your file on the Mathcad website, someone may be able to at least tell if it's a problem with your system or your file:
http://collab.mathsoft.com/~Mathcad2000

TTFN

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close