Skip to content

Instantly share code, notes, and snippets.

@zbrasseaux
Last active January 22, 2020 00:03
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/e67b52c63e0508cc1aef4d238341d37a to your computer and use it in GitHub Desktop.
Save zbrasseaux/e67b52c63e0508cc1aef4d238341d37a to your computer and use it in GitHub Desktop.
function end_matrix = hw2_06
% provided starting matrix
start_matrix = [0,-1,-2,-3,-4,-5,-6,-7;
1,0,-1,-2,-3,-4,-5,-6;
2,1,0,-1,-2,-3,-4,-5;
3,2,1,0,-1,-2,-3,-4;
4,3,2,1,0,-1,-2,-3;
5,4,3,2,1,0,-1,-2;
6,5,4,3,2,1,0,-1;
7,6,5,4,3,2,1,0];
% apply median filter to starting matrix
end_matrix = medfilt2(start_matrix, [3,3]);
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment