Thread Subject: Display 2/3D intersect through N-dimensional data

Subject: Display 2/3D intersect through N-dimensional data

From: Sebastiaan

Date: 23 Sep, 2009 12:32:19

Message: 1 of 1

Dear list,

I am trying to visualize a 2D or 3D intersection through N-dimensional space. I have a MxN dimensional vector, representing M datapoints in a N-dimensional space. I would like to display an intersection at 2D or 3D.

To be more specific, this is how I manage to display a 2D intersection in 3D data:
=======
% Example data
values = [ 52.1604 48.0201 10.5091
           50.0431 27.9238 11.2288
           48.4468 27.0577 12.0966
           47.8208 26.3740 36.9124
           25.2242 47.8943 11.8162
           26.4781 29.4144 12.9638
           26.9779 27.7666 46.7116
           24.0719 47.4857 12.9129
           24.5166 30.1623 44.3904
           23.4123 48.1717 45.6871];

% Cut through dimension 2 at value 35
[XI,YI] = meshgrid(linspace(min(values(:,1)), max(values(:,1)), 100), 35);
ZI = griddata(values(:,1),values(:,2),values(:,3),XI,YI);

% Plot against dimensions 1 and 3
plot(XI, ZI);

% Alternative using ndgrid and griddatan
[XI,YI] = ndgrid(linspace(min(values(:,1)), max(values(:,1)), 100), 35);
ZI = griddatan(values(:,1:2),values(:,3), [XI YI]);
plot(XI, ZI);

=======

However, I only seem to be able to use griddatan to make a 2D plot. E.g. a 3D intersection of 4D data could look like this:

[XI,YI,WI] = ndgrid(linspace(min(values(:,1)), max(values(:,1)), 100), 35, linspace(min(values(:,3)), max(values(:,3)), 100));
ZI = griddatan(values(:,1:3),values(:,4), [XI YI WI]);
surf(XI, WI, ZI);

but is not a correct function call. How can I do this?

Thanks for any hints!

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
intersect Sebastiaan 23 Sep, 2009 08:34:28
griddata Sebastiaan 23 Sep, 2009 08:34:28
rssFeed for this Thread

Contact us at files@mathworks.com