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
- :
- Plotting simple 2d graphic from adjacency matrix a...

Options

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

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

Showing results for

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

08-07-2019
02:26 PM

08-07-2019
02:26 PM

Hiya,

(Mathcad Noob here )

I'm trying to get Mathcad Prime to do a relatively simple plot using an adjacency matrix and homogeneous data points.

In Matlab I can do this quite simple like so:

Which results in this:

Now if I try to the same in Mathcad I get this (dont mind the 3d plots, just fiddling around):

I'm sure its because I don't know what I'm doing, since I'm still relatively new in mathcad. And it might even not be possible to do in Mathcad. But I was hopeing someone could enlighten me.

Thanx.

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

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

08-07-2019
04:37 PM

08-07-2019
04:37 PM

Unfortunately Prime does not offer the nice plot functions Matlab provides.

But you may create your own functions depending on your needs.

If the list of points is contiguous, in the correct order and the third coordinate of the homogeneous coordinates is guaranteed to be always 1, this (similar to Lucs approach) would be the most easiest way:

But if this easy approach is not applicable you have to resort to writing your own function. I created a function "gplot" (by no means as universal as Matlab's, of course) which does what I think you'd like to be done. I am taking into account the upper right half of the symmetric adj matrix only and distinguish only between zero and non-zero value.

Just a quick hack - hope it helps.

Prime 5 worksheet attached.

4 REPLIES 4

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

08-07-2019
03:29 PM

08-07-2019
03:29 PM

Re: Plotting simple 2d graphic from adjacency matrix and a homogeneous data matrix

I have no idea what an adjacency matrix is, neither why you need it to get the plot you're after, given matrix D.

Does the attached help?

Success!

Luc

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

08-07-2019
04:37 PM

08-07-2019
04:37 PM

Unfortunately Prime does not offer the nice plot functions Matlab provides.

But you may create your own functions depending on your needs.

If the list of points is contiguous, in the correct order and the third coordinate of the homogeneous coordinates is guaranteed to be always 1, this (similar to Lucs approach) would be the most easiest way:

But if this easy approach is not applicable you have to resort to writing your own function. I created a function "gplot" (by no means as universal as Matlab's, of course) which does what I think you'd like to be done. I am taking into account the upper right half of the symmetric adj matrix only and distinguish only between zero and non-zero value.

Just a quick hack - hope it helps.

Prime 5 worksheet attached.

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

08-07-2019
11:19 PM

08-07-2019
11:19 PM

Re: Plotting simple 2d graphic from adjacency matrix and a homogeneous data matrix

Some examples from this community.

T. Tokoro.

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

08-12-2019
02:50 PM

08-12-2019
02:50 PM

Re: Plotting simple 2d graphic from adjacency matrix and a homogeneous data matrix

It looks promising, I'll test it and see if it works as I think it will.

I'll report back.

thanks so far.

Top Tags