×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• 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.

# Create a 3D plot

## Create a 3D plot

(OP)
I want to analyze the stress on a part.  I want to vary two part dimensions through ranges:

l_k = 2, 3 ... 200 mm

D_A = 18, 19 ... 200 mm

I want to use a Finite Element Method software program to calculate the stress σ in the part using these two variables.  Then, I would like to import the stress values into MathCAD and create a plot with l_k as the x axis, D_A as the y axis, and σ as the z axis.  I am only a novice MathCad user, so I don't really know how to start.  I have reviewed MathCad help and the MathSoft Collaboratory, but I can't understand them very well.  All help is appreciated.

Regards,

Cory

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.

### RE: Create a 3D plot

OK, that's easy.

Read the structured data file (which in the simple case will have to be in the mathcad directory) into a matrix M, using

in this case it would look for filename.prn in the current directory. space comma or tab delimited.

Then display M in a 3D plot

Go the graphics menu , click on the sort of plot you want, type M in the placeholder

Cheers

Greg Locock

### RE: Create a 3D plot

(OP)
Greg,

If the .prn file is a matrix of 199 columns and 183 rows (the number of elements in my variables), Mathcad will automatically recognize the number of columns and rows as vectors that I can graph?  I assumed I would have to use i and j as range variables then transform i (from 1 to 199) and j (from 1 to 183) into my variables l_k (from 2 to 200) and D_A (from 18 to 200).  Mathcad 8 has a 100 row/column limit to matrices - is this true for version 12?

Regards,

Cory

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.

### RE: Create a 3D plot

I didn't know about the limit in size for matrices, so long as you are under that you don't need to worry about anything else, you DON'T need range variables for 3D plots

If you did you'd use something like i:0;rows(M)-1

Just play around with a small matrix, you'll figure it out in no time.

To be honest I'm a non fan of the Mathcad way with matrices, I want big matrices with unlimited dimensions, not 2d only.

Cheers

Greg Locock

Thanks...

TTFN

### RE: Create a 3D plot

(OP)
I am still fine-tuning the FEM analysis, so I don't have the data yet.  I was more worried about what syntax to use to display the data in Mathcad, hence my simplified 3x3 input matrix.  I will post a larger raw data file to the Collab soon.  Thanks.

Regards,

Cory

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.

### RE: Create a 3D plot

(OP)
I assumed that the first file I posted was readable by anyone.  Now I understand that you couldn't see anything, hence the "useless" comment.

Regards,

Cory

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.

### RE: Create a 3D plot

Not sure what happened during your posting, but the Collab server software does allow you to post multiple files with your posting.

TTFN

### RE: Create a 3D plot

(OP)
My first message included only the Mathcad file - I didn't think about needing to attach a raw data file.  The file in the first message used only three points each for my two variables, rather than 199 and 183 (I don't have all 199*183 = 36 417 points yet).  Then, I posted a new Mathcad file with 20 points for each variable, and a raw data file based on the 20*20 = 400 points (still don't have all points yet).  Then I got some good help.

Regards,

Cory

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.

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

#### 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
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:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!