Write a function that takes a 2D matrix/1D vector x 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
numel
height
width
sum
find
max
min

Solution Stats

15 Solutions

6 Solvers

Last Solution submitted on Mar 03, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...