cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Changing graph that exists as a model.

DN_10709433
2-Guest

Changing graph that exists as a model.

Hello,

 

I'm learning Mathcad and have been working on a problem using the software and had an idea of autogenerating a drawing using whatever variables I am given. To do so, I am using the XY plot graph function. I have created the plot and created some lines using my variable to get a general shape, but each line is infinite. I can't seem to figure out how to make each line a line segment that has an actual start and end. I have attached my Mathcad file which has all of the different variables and the plot, as well as some CAD drawings in there that show what my auto-generated drawing is attempting to look like. End goal is to have different loads being shown as arrows as well applying force to the wall structure.

The plot is at the very bottom after all my calculations because I have still been messing with it. I have tried to use boolean equation stuff and matrixes to no real success. I am using Mathcad 15.

 

The problem is a basic statics problem where I solve for loads on a retaining wall.

Thanks for the help,

Daniel

 

1 ACCEPTED SOLUTION

Accepted Solutions

It wasn't really clear to me which plots you actually expected.

So I provide some general informations about plotting, limiting plots in x- or y direction and plotting line segments.

Werner_E_0-1686171842351.png

MC15 file attached

 

View solution in original post

6 REPLIES 6
LucMeekes
23-Emerald III
(To:DN_10709433)

Hi Daniel,

welcome to this forum.

The reason for your 'infinite' lines is the fact that you did not define the ordinate value, x.

That's also why it shows in red colour in the assignments just above the plot.

Normally Mathcad doesn't like undefined variables, but it makes an exception:

- in symbolics

- when plotting, and the undefined is the ordinate value.

To get limited lines, you could define x to be a range.

Type above the plot:

x : 10 , 11 ; 20

(That is, an x, then a colon, then the 10, a comma, the 11, then a semicolon, then the 20)

It 'll show as:

x := 10 , 11 ... 20

That will define x to be a range starting at 10, the next value is 11 and it stops at 20.

If you exchange the 11 for a 10.5 then x steps become smaller, you get more steps.

 

Success!
Luc

 

 

Thanks for such a prompt response and the welcome. I used this option first but ran into a few problems such as the range limiting would limit all of the lines the same, which wasn't what I was going for, so I moved onto other options posted here, but thanks once again for such a quick response.,

 

Daniel

LucMeekes
23-Emerald III
(To:DN_10709433)

If you actually want to draw line drawings in the plot, you may be better off defining an array.

(Note that an array is something different from a range!)

Here's an example

LucMeekes_0-1686171576307.png

And you can draw multiple shapes using just a single array. Points that contain NaN values are not plotted, so, to draw two separate lines you can:

LucMeekes_0-1686172370141.png

 

Success!
Luc

I saw this response second and was a bit confused but got me on my track to finishing up my graph, thanks for posting a second option so quickly.

It wasn't really clear to me which plots you actually expected.

So I provide some general informations about plotting, limiting plots in x- or y direction and plotting line segments.

Werner_E_0-1686171842351.png

MC15 file attached

 

This explanation and option was really helpful, thanks for the mathcad file that allowed me to quickly see the different examples and quickly mess with them and better understand the information presented. I used this the most fixing up my graph. It's still a bit in progress because I am trying to possibly add the loads as vectors but I am not entirely sure how to do that. I haven't explored it too much yet as I am also figuring out how to best represent different load triangles or if I will at all. I've attached a semi-messy updated document to this reply because I thought it was cool to see the graph function. Its midway down the document if you want to check it out in more depth. I'll also probably look into stacking up some of the lines to have them be the same and less messy.

 

Thanks once again,

Daniel

DN_10709433_0-1686178464200.png

 

Top Tags