image thumbnail

MATLAB Plot Gallery - Ribbon Plot

by

 

24 Feb 2012 (Updated )

Create a 3D ribbon plot

Ribbon_Plot

This is an example of how to create a 3D ribbon plot in MATLAB®.

Read about the ribbon function in the MATLAB documentation.

For more examples, go to MATLAB Plot Gallery

% Create a grid of x and y points
[x, y] = meshgrid(-2:0.2:2,-2:0.2:2);

% Calculate the response values at each point
R = (1./(x.^2+(y-1).^2).^(1/2)) - (1./(x.^2+(y+1).^2).^(1/2));

% Create a ribbon point using the ribbon function
figure
ribbon(R)

% Add title and axis labels
title('Response')
xlabel('x')
ylabel('y')
zlabel('z')

Contact us