Cody

Problem 42646. Matrix FUN

Created by Manish Joshi in Community

Given a Matrix M, find out the number of elements of matrix that are divisible by 3.

    M = [1 2 3;4 5 6;7 8 9];
    out = 3
    M = [32 12 15; 2 6 45];
    out = 4

Solution Stats

51.87% Correct | 48.13% Incorrect
Last solution submitted on Feb 18, 2019

Problem Comments

Recent Solvers84

Suggested Problems

More from this Author3

Discover MakerZone

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

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!