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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

17-Peridot

## 3D Plot - Divide By Zero "Difficulty"

Hello Dear Friends,

I would like to plot the following equation in 3D Plot in the variables freq and t, but I don't realize how I could manage to fool (if possible, obviously) Mathcad 15 about 'Divide By Zero'.
Or what am I wrong or do I not take into account when plotting the chart?

Another thing is:

----------------------------------------------------------------------------------------------------------

Case 1:

Case 2:

Why does the second graph not display like the first?

Thank you.
Best regards.

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby V
(To:Cornel)

@Cornel wrote:

Hello Dear Friends,

I would like to plot the following equation in 3D Plot in the variables freq and t, but I don't realize how I could manage to fool (if possible, obviously) Mathcad 15 about 'Divide By Zero'.
Or what am I wrong or do I not take into account when plotting the chart?

Either avoid frequency=0 as Valery had shown, or, if you really need results for frequencies very close and up to zero, you may redefine your function:

Why does the second graph not display like the first?

Why do you think they should?  The first one shows the range from 0 to 4 seconds but in the second one you demand a range 1250 times larger. Furthermore with the range you define you are sampling at multiples of 1s which means that all sampled function values would be zero! Your plot show values up to 10^-12 because of numerical inaccuracies.

Here are the "sine waves" for a smaller sampling frequency:

Maybe you had 5000 ms= 5 s   in mind??

7 REPLIES 7
24-Ruby IV
(To:Cornel)

24-Ruby V
(To:Cornel)

@Cornel wrote:

Hello Dear Friends,

I would like to plot the following equation in 3D Plot in the variables freq and t, but I don't realize how I could manage to fool (if possible, obviously) Mathcad 15 about 'Divide By Zero'.
Or what am I wrong or do I not take into account when plotting the chart?

Either avoid frequency=0 as Valery had shown, or, if you really need results for frequencies very close and up to zero, you may redefine your function:

Why does the second graph not display like the first?

Why do you think they should?  The first one shows the range from 0 to 4 seconds but in the second one you demand a range 1250 times larger. Furthermore with the range you define you are sampling at multiples of 1s which means that all sampled function values would be zero! Your plot show values up to 10^-12 because of numerical inaccuracies.

Here are the "sine waves" for a smaller sampling frequency:

Maybe you had 5000 ms= 5 s   in mind??

17-Peridot
(To:Werner_E)

I had tried (at least initially, as you can see from the message and you noticed) a way to start from the value 1 (that's because I was thinking about the 3D chart, and I said to see what it looks like for the 2D chart.), and not from the value 0, due to the fact that I had received that message with "Divide By Zero".
But if I put the first value 1 then it didn't work to put the second value (increment value) to be less than 1 (or at least that's how I saw it look in Mathcad 15).

I had initially tried to avoid the starting value to be 0, this is the argument, I mean that's how I thought in the first phase.

It was an initial attempt, after which I said to post here on the group to see what other opinions other colleagues will come up with.

It's okay now, I mean after I've read the posts from both of you (@ValeryOchkov, @Werner_E ).

Thank you.
Best regards.

24-Ruby V
(To:Cornel)

But if I put the first value 1 then it didn't work to put the second value (increment value).

The second value of a range is NOT the increment but its the second value of the series.

For an increment of 100 ms starting from 1s you would have to write "1s,1s+100ms .. " or "1s, 1.1 s ..".

17-Peridot
(To:Werner_E)

Oops, aha.

Thank you.
Best regards.

20-Turquoise
(To:Cornel)

17-Peridot
(To:ttokoro)

Ok.

Thank you.
Best regards.

Announcements
Top Tags