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
- :
- Is it possible to plot a tensor (4D surface) in Ma...

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

05-02-2011
08:26 PM

05-02-2011
08:26 PM

Is it possible to plot a tensor (4D surface) in Mathcad 13 or 14?

I would like to plot a 4-dimensional surface using Mathcad. I think this would be a tensor, i.e. visualized as a 3D surface with vectors of various heights projected on top. I found in Mathcad 14 an quicksheet (Using Regress: Multivariate Regression) of a 3D plot using the 'regress' and 'mesh' functions. I wonder if this is the limit, or if I can plot a tensor somehow using these, or other mathcad 14 functions? Thanks - JCG

Labels:

6 REPLIES 6

Highlighted
##

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

05-03-2011
12:39 AM

05-03-2011
12:39 AM

Re: Is it possible to plot a tensor (4D surface) in Mathcad 13 or 14?

John Gray wrote:

I would like to plot a 4-dimensional surface using Mathcad.

John!

Do you have a function of 3 variables - f(x, y, z)?

Highlighted
##

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

05-03-2011
10:52 AM

05-03-2011
10:52 AM

Re: Is it possible to plot a tensor (4D surface) in Mathcad 13 or 14?

I have not yet generated the function in 3 variables - I have test data reduced to 4 sets of (3 sets of (a function of 1 variable))). Further data reduction is required. With the quick sheet method using 'regress' referenced in my original question, I will likely be able to get a least squares reduction to 2 variables.

So, in parallel with my first question, I have a second one. That is: *Is there a way to generate a least squares data fit in 3 variables using Mathcad, perhaps using the 'regress' function?*

Thanks,

JCG

Highlighted
##

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

05-03-2011
03:01 PM

05-03-2011
03:01 PM

Re: Is it possible to plot a tensor (4D surface) in Mathcad 13 or 14?

John Gray wrote:

So, in parallel with my first question, I have a second one. That is:

Is there a way to generate a least squares data fit in 3 variables using Mathcad, perhaps using the 'regress' function?

It is possible. You must convert your matrix into 4 vectors f, x, y and z and use the minimize or minerr function.

See same task for 2 variables:

Highlighted
##

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

05-03-2011
06:05 PM

05-03-2011
06:05 PM

Re: Is it possible to plot a tensor (4D surface) in Mathcad 13 or 14?

So, in parallel with my first question, I have a second one. That is: Is there a way to generate a least squares data fit in 3 variables using Mathcad, perhaps using the 'regress' function?

You can do a least squares fit in any number of dimensions. Regress will fit multinomials, but you can also fit any arbitrary function. See the worksheet I posted here:

http://communities.ptc.com/message/162498#162498

It was posted in answer to a somewhat different question, but it shows how to fit a function to a surface using minerr. This is easily extensible to any number of dimensions, and any function.

I have not yet generated the function in 3 variables - I have test data reduced to 4 sets of (3 sets of (a function of 1 variable))). Further data reduction is required. With the quick sheet method using 'regress' referenced in my original question, I will likely be able to get a least squares reduction to 2 variables.

If you have a large number of measurements in N variables a very good approach to variable reduction is often principal component analysis. It will generate a new set of variables that are guaranteed to be orthogonal, and they will explain a gradually decreasing amount of the variance in the data. I can't say how well this would work for your data without seeing the data though.

Highlighted
##

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

05-03-2011
02:07 AM

05-03-2011
02:07 AM

Re: Is it possible to plot a tensor (4D surface) in Mathcad 13 or 14?

John Gray wrote:

John,

You could try, as a starting point, something like the attached. However, it is rather contingent upon your 'surface' being amenable to such a representation. Sadly, the 3D plot component doesn't seem to allow setting of colour by x,y,z position otherwise that might be another way of visualizing the data.

Stuart

Highlighted
##

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

05-03-2011
10:57 AM

05-03-2011
10:57 AM

Re: Is it possible to plot a tensor (4D surface) in Mathcad 13 or 14?

The example mathcad tensor plots certainly have all the graphic elements I have been seeking.

I will need to study the program you've written to generate the arrows as this is an aspect of Mathcad programming that I've not yet worked. I plan to attempt this method and get back to you with any detailed questions.

Thanks,

JCG