Thread Subject: need help in 3D plot

Subject: need help in 3D plot

From: Clement Lim

Date: 10 Oct, 2009 14:26:02

Message: 1 of 2

Hi All,

I had the following code to plot the membrane function. However, i realized that there will be a certain part of the plot which appear in terms of grid instead of coloured. I understand that membrane is the logo of matlab. Can anyone advise me on how to amend the below code so that the part of the plot which is in grid line is not shown? I still wan the axis to be on for the plot. The code is below:

Fs=fs/(1024*1024);
temp = [0.5*Fs, 0.9*Fs, 2*Fs^2, ...
    1.5*Fs, 4*Fs, 5*Fs, 6*Fs, ...
    5*Fs^2, 5*Fs^2, 7*Fs, 8*Fs, 9*Fs];

% Eigenfunctions
for k = 1:12
   L{k} = membrane(k);
end

% Get coefficients from eigenfunctions.
for k = 1:12
    c(k) = L{k}(25,23)/3;
end
 
% Set graphics parameters.
fig = figure;
set(fig,'color','white')
x = (-15:15)/15;
h = surf(x,x,L{1});
[a,e] = view;
view(a+90,e);
axis([-1 1 -1 1 -1 1]);
caxis(26.9*[-1.5 1]);
colormap hsv;
axis on

Subject: need help in 3D plot

From: arich82

Date: 10 Oct, 2009 19:52:01

Message: 2 of 2


> I had the following code to plot the membrane function. However, i realized that there will be a certain part of the plot which appear in terms of grid instead of coloured. I understand that membrane is the logo of matlab. Can anyone advise me on how to amend the below code so that the part of the plot which is in grid line is not shown? I still wan the axis to be on for the plot.
</snip>

It's unclear (to me) what your asking for. Does one of these do what you're looking for?

% remove border around each patch
>> set(h, 'EdgeColor', 'none');

% remove grid from floor and walls of axis
>> grid off;

% remove part of plot lying in discretized x-y plane
>> L{1}(L{1}==0)=NaN;
>> h = surf(x,x,L{1});

Tags for this Thread

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.

rssFeed for this Thread

Contact us at files@mathworks.com