what does "It is not detecting if a matrix is even or non-square" mean?

i was asked to do a few simple exercises but since i am new to matlab, it is not as easy as it seems.. how would you show(in a function) the size of a matrix?

 Accepted Answer

[m,n] = size(M);

3 Comments

what does this mean.. "Code is not detecting incorrect input"
At a guess I would say this is a statement made by a human who does not approve of an aspect of some code which is to receive input from a user, because that input is not being tested for possible incorrect form. For example, suppose a code is to receive a number, n, which is to be used as an integer. It is a good policy to test the number after being received to see if it is actually an integer, say, by the test:
if n~=round(n), error('Input value should be an exact integer'), end
i see i see, thanks for the help!

Sign in to comment.

More Answers (0)

Asked:

LG
on 19 Mar 2015

Commented:

LG
on 19 Mar 2015

Community Treasure Hunt

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

Start Hunting!