from
Elliptic Bumps
by Roy Schestowitz
Generate and display sets of elliptic bumps
|
| generate_show_elliptic_bumps() |
function generate_show_elliptic_bumps()
% GENERATE_SHOW_ELLIPTIC_BUMPS: Generates and shows the newly-generated 1-D image set.
%
% ABOUT
%
% -Created: October 1st, 2004
% -Last update: October 1st, 2004
% -Revision: 0.0.1
% -Author: R. S. Schestowitz, University of Manchester
% ==============================================================
save_bumps = 0;
% indicated if bumps need to be saved as images (boolean)
format = 'png';
% if data is saved as an image, this paramater defines the format
% by which it shall be saved.
bump_width_variation = 0.5;
bump_height = 0.2;
bump_height_variation = 0.3;
bump_position_freedom = 0.9;
n_images = 3;
% number of images
image_width = 200;
% the number of pixels in each image
rand('state',sum(100*clock))
% seeding for random numbers.
[imagelist, images, points] = make_elliptic_bumps(n_images, image_width ...
, save_bumps, format, bump_height, bump_position_freedom ...
, bump_height_variation, bump_width_variation);
% create a set of images given several parameters
points = -1 + 2 * (points - 1) / (image_width - 1);
% normalise the data for plotting purposes
figure('Name','Elliptic Bumps');
for i = 1:n_images,
subplot(n_images, 1, i);
hold on;
plot(images(:,i));
axis([0 image_width 0 1]);
grid off;
hold off;
end
|
|
Contact us at files@mathworks.com