jump to navigation

Anti-Alias for Matlab February 6, 2011

Posted by viboon in : Matlab , add a comment

Myaa – My Anti-Alias for Matlab
by Anders Brun
Code covered by the BSD License

Available at http://www.mathworks.com/matlabcentral/fileexchange/20979


Tags: , ,

Related posts:

Making transparent graph by using alpha function November 10, 2010

Posted by viboon in : Matlab , add a comment
1
2
3
4
5
[x,y,z] = peaks;
h = surf(x,y,z);
alpha(h,'x'); %according to x
alpha(h,'y'); %according to y
alpha(h,'z'); %according to z

Tags: , , ,

Related posts:

Applying limit to surface plot in MATLAB August 30, 2010

Posted by viboon in : Matlab , add a comment
1
2
3
4
z=peaks;
z(abs(z)>2)=nan;
surf(z);
zlim([-10 10]);

NaN will not be included.


Tags: , ,

Related posts:

Controlling saturation levels of colormap in MATLAB August 27, 2010

Posted by viboon in : Matlab , add a comment

Sometimes we want to change the level of color mapping to be fitted in a specific range. To adjust the level, we have to change/assign some plot’s properties by using “set” function as expressed below.

1
2
3
4
set(gca, 'cdatamapping', 'scaled')
%
set(gca, 'climmode', 'manual')
set(gca, 'clim', [1 10]) %mapping of 1 to 10

Tags: , ,

Related posts:

change X/Y axis location of plot in Matlab July 28, 2010

Posted by viboon in : Matlab , add a comment
1
2
3
4
set(gca,'XAxisLocation', 'top');
set(gca,'XAxisLocation', 'bottom');
set(gca,'YAxisLocation', 'left');
set(gca,'YAxisLocation', 'right');

Tags: ,

Related posts:

ON/OFF grids of the MATLAB plot July 22, 2010

Posted by viboon in : Matlab , add a comment
1
2
3
4
plot(rand(10,1));
set(gca,'xgrid','on','ygrid','on');
%to OFF the grids
set(gca,'xgrid','off','ygrid','off');

Tags: ,

Related posts:

2 plots in the same plotting area January 21, 2010

Posted by viboon in : Matlab , add a comment
1
2
3
4
x=linspace(0,2*pi);
y1=sin(x);
y2=100*cos(x);
plotyy(x,y1,x,y2);

In order to show the most recent graph,

1
shg;

Tags: ,

Related posts:

Present the surface plot cosmetically in Matlab January 21, 2010

Posted by viboon in : Matlab , add a comment
1
2
3
4
5
6
7
8
surf(peaks);
lighting phong;
shading interp;
colormap winter;
light;
 
%Dynamic colormap
spinmap;

Tags: ,

Related posts: