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

I can`t plot an ellipse in Mathcad

ptc-3682623
Garnet

I can`t plot an ellipse in Mathcad

I do not know what I do wrong in sample. I can't plot graphs.

15 REPLIES 15

Re: I can`t plot an ellipse in Mathcad

k.x:=??

k.png

Re: I can`t plot an ellipse in Mathcad


@ptc-3682623 wrote:

I do not know what I do wrong in sample. I can't plot graphs.


How can you expect a plot without providing any values??

Here is a simple fix by providing the necessary values via a global assignment. What did you mean with the second argument 0.1 you wrote for the functions y1,y2?

Werner_E_0-1607006177358.png

You may also consider turning all your variables in functions of the five input parameters. It may be necessary to uses the "assume" statement in the symbolic evaluations to tell Mathcad which parameters are real, positive, greater than the other, etc. The symbolic results may be quite too large for Mathcad being willing to display. Not sure if you really need symbolic results anyway.

 

Mathcad15 worksheet attached

 

Re: I can`t plot an ellipse in Mathcad

Not allowed to edit the post I just made, so the remark here in a follow up.

 

If the goal is just to plot the ellipse, a parametric representation might be more appropriate:

Werner_E_0-1607006475007.png

(The absolute values aren't strictly necessary)

 

ItRe: I can`t plot an ellipse in Mathcad

It is an ellipse

Ellipse.png

Re: ItRe: I can`t plot an ellipse in Mathcad

A hyperbola

hyperbola.png

Re: ItRe: I can`t plot an ellipse in Mathcad

An ellipse too

Ellipse-too.png

Re: I can`t plot an ellipse in Mathcad

@ValeryOchkov 

I may be blind but as far as I can see your three answers don't take into account the questioner's file and his question about it? They were just triggered by the subject "plot an ellipse", right? 🙂

As far as your plotting of implicit functions concerns I strongly would suggest to use Viacheslav N. Mezentsev's function "implicitplot2d" - it usually gives a better result much faster.

See her the use for your example of an ellipse and a hyperbola:

Werner_E_0-1607027647231.png

P.S.: Of course you don't need implicit plots at all for conic sections (ellipse, hyperbola, parabola) as you always can find a parametric representation to plot it directly.

 

 

 

Re: I can`t plot an ellipse in Mathcad

Afterthought

Here is what I was talking about when I wrote that you can always find a parametric representation for a quadric (conic section):

Werner_E_0-1607029591220.png

 

Mathcad 15 worksheet attached

Re: I can`t plot an ellipse in Mathcad

OK! But!

1. We MUST use units in this problem. It is modern standard!

2. KISS - Keep it simple, stupid!

3. Can you solve with Мезенцев tools this problem?

Nautilus.png

 

Re: I can`t plot an ellipse in Mathcad


@ValeryOchkov wrote:

OK! But!

1. We MUST use units in this problem.

 


Sure not. What we have to do is respond to the questioner's specific question and answer it as best as possible. Otherwise this forum would be relatively meaningless IMHO.

 

Re: I can`t plot an ellipse in Mathcad


@ValeryOchkov wrote:

OK! But!

3. Can you solve with Мезенцев tools this problem?


You can do it like this

2021-01-27_21-07-04.png

2021-01-27_23-11-06.png

Re: I can`t plot an ellipse in Mathcad

The same problem. Sample in attachment.

Re: I can`t plot an ellipse in Mathcad


@ptc-3682623 wrote:

The same problem. Sample in attachment.


No, its not the same problem! The entries on the abscissa and the ordinate must correspond. If there are less entries on the abscissa, the existing ones are matched with those on the ordinate and the rest of the ordinate entries are matched with the last entry on the abscissa.

Werner_E_0-1607090448158.png

You should also change the number format, otherwise you would see just zeros at the ordinate. Alternatively it might be better to multiply the values by 10^9 tp represent nm instead of m. You know you can work with units in Mathcad from the start? Its a valuable feature you sure should try.

 

Re: I can`t plot an ellipse in Mathcad

Now is something wrong too. If I put more points I got error like in sample. We need put more points like in sample4. It will be 6 more points like in sample4.

Re: I can`t plot an ellipse in Mathcad

The error message says it all. The total number in one plot region is limited to 500000 in Mathcad (the help states erroneously 150000 which was the limit in earlier versions of Mathcad) .

So you must reduce the number of values in the various range variables you are using for plotting.

 

I just had a look at the range xx.10.9.5% which you defined. This range variable has 40386 values and so the two plots which use this range consist of nearly 81000 points. Some other ranges you use seem to have even more values and so the twelve plots you try to show in this last regions exceed the total limit of half a million points.

 

So change the 10^-6 in the definition of your ranges to a larger value - 10^-5 will do, 10^-4 will be even better and will also speed up editing and scrolling your sheet.

If you don't like the gaps in the ellipses at the left and right ends, you'll have to plot the ellipses uses their parameter representation as I had shown a while ago in a previous answer.

 

 

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."