Write a function that takes a matrix A as input and returns a row vector containing the number of rows and the number of columns of the matrix. If the input matrix is empty return -1 for both the number of rows and columns.
You are not allowed to use the MATLAB built-in functions:
  • size
  • length

Solution Stats

30 Solutions

16 Solvers

Last Solution submitted on Jun 06, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers16

Suggested Problems

More from this Author10

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!