Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Problem with a chaotic graph

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-21-2020
08:55 PM

02-21-2020
08:55 PM

Problem with a chaotic graph

Hello,

I have a chaotic graph with the x-axis ranging from 0 to 200 increments. I would like to increase the increments of the x-axis to 20000 without that affecting the graph shape.

8 REPLIES 8

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-22-2020
07:21 AM

02-22-2020
07:21 AM

Re: Problem with a chaotic graph

Not quite sure what you are looking for.

Do you mean a result like the following?

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-22-2020
07:26 AM

02-22-2020
07:26 AM

Re: Problem with a chaotic graph

or are you looking for something like this:

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-22-2020
11:44 AM

02-22-2020
11:44 AM

Re: Problem with a chaotic graph

Hi Warner_E

Thank you for your reply. I kind of want such a kind of graph but not in this way.

I want it to have 20000 increments. The thing you have done has 200 increments and you have multiplied it by 100.

I want a graph which look like this provided that both axes have 20000 increments. If I simply increase the range to 20000, the graph would be too messy.

I think the problem is somehow related to the random number generation of the file.

Best,

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-22-2020
01:12 PM

02-22-2020
01:12 PM

Re: Problem with a chaotic graph

@mzarrabi wrote:

Hi Warner_E

Thank you for your reply. I kind of want such a kind of graph but not in this way.

I want it to have 20000 increments. The thing you have done has 200 increments and you have multiplied it by 100.

I want a graph which look like this provided that both axes have 20000 increments. If I simply increase the range to 20000, the graph would be too messy.

I think the problem is somehow related to the random number generation of the file.

Best,

Yes, my first suggestion simply stretches the plot in abscissa direction but there still are just 200 data points.

But the second suggestion consists of 20000 data points and as you wrote that you'd like it to be similar to your first plot, I changed the intervals for the various different ranges for the random numbers accordingly.

Of course because of the much larger number of random points there is much more "up and down".

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-22-2020
01:26 PM

02-22-2020
01:26 PM

Re: Problem with a chaotic graph

Consider it as a cyclic loading. The first graph only has a few spikes of more than 0.1, but the second graph you are suggesting is having a lot of peaks exceeding 0.1. I don't want to change the loading features. I just need to break the graph into several points (like 20000) so that when I apply it to a numerical model the model could converge.

Maybe I need another function that divides peak to peak points of the first graph into 100 increments so that the graph can have 20000 points (200*100=20000).

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-22-2020
02:38 PM

02-22-2020
02:38 PM

Re: Problem with a chaotic graph

@mzarrabi wrote:

Consider it as a cyclic loading. The first graph only has a few spikes of more than 0.1, but the second graph you are suggesting is having a lot of peaks exceeding 0.1. I don't want to change the loading features. I just need to break the graph into several points (like 20000) so that when I apply it to a numerical model the model could converge.

Maybe I need another function that divides peak to peak points of the first graph into 100 increments so that the graph can have 20000 points (200*100=20000).

Maybe linear interpolation ("linterp") will do the job you are looking for? The plots will look exactly identical and only every hundredth point will be calculated at random - inbetween simple linear interpolation occurs.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-22-2020
03:15 PM

02-22-2020
03:15 PM

Re: Problem with a chaotic graph

Here is an example of what I was talking about. I omitted the calculation of N as its not used for the plot.

You may also use spline interpolation instead of linear interpolation by writing

f(t)<--interp(cspline(T,B),T,B,t)

but I don't think that this will make much difference.

Worksheet (MC15) attached

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-22-2020
11:06 AM

02-22-2020
11:06 AM

Re: Problem with a chaotic graph

Hi,

How about this solution?