Skip to content

Instantly share code, notes, and snippets.

@zbrasseaux
Last active January 22, 2020 00:02
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/37802488eedcfc366547aa5b7b1bb694 to your computer and use it in GitHub Desktop.
Save zbrasseaux/37802488eedcfc366547aa5b7b1bb694 to your computer and use it in GitHub Desktop.
function [A,B] = hw2_05
% read in csv
matrix_input = csvread('hw2_05.csv');
% before histogram
A = histogram(matrix_input);
% provided filter
filter = [-1,2,-1];
% apply the filter to the image
matrix_input_post = conv2(matrix_input, filter, 'same');
% after histogram
B = histogram(matrix_input_post);
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment