Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Problem 2234. Find and replace the zero array in a matrix

Created by Essi

Find the zero array in the matrix and replace it with average of surrounding (adjacent) arrays.

Example:

A =

     3     5     7    90     1
     5     1    -1     0     2
     1     2     3     4    70
    23     1     2     3     5

Output is:

B=23.75;

Tags

Problem Group

Solution Statistics

33 correct solutions 41 incorrect solutions
Last solution submitted on Apr 08, 2016

Problem Comments