Skip to content

Instantly share code, notes, and snippets.

@zbrasseaux
Last active January 22, 2020 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zbrasseaux/a5439828d1e4bf93e8ab7dd967e7a5fb to your computer and use it in GitHub Desktop.
Save zbrasseaux/a5439828d1e4bf93e8ab7dd967e7a5fb to your computer and use it in GitHub Desktop.
function [results] = hw2_04
% provided matrix and filters
image_x = [10,10,10,10,10,40,40,40,40,40];
filter_a = 1/5 * [1,1,1,1,1];
filter_b = 1/10 * [1,2,4,2,1];
% apply the filters to the image
results_a = conv2(image_x, filter_a, 'same');
results_b = conv2(image_x, filter_b, 'same');
% return results
results = [results_a;results_b];
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment