Hello, I have an array and I am trying to find the maximum difference between an element and all of its neighboring elements for each element. For example if I have… array = [1 2 3; 4 10 5; 6 7 8 ]; I want to find the maximum difference between each element and any neighboring element to get an output with the maximum difference
output = [3 8 7; 6 9 5; 4 3 3]; Any help would be greatly appreciated!
Best Answer