Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

isscalar

Determine whether input is scalar

Syntax

isscalar(A)

Description

isscalar(A) returns logical 1 (true) if size(A) returns [1 1], and logical 0 (false) otherwise.

Examples

Test matrix A and one element of the matrix:

A = rand(5);

isscalar(A)
ans =
     0

isscalar(A(3,2))
ans =
     1

Introduced before R2006a

Was this topic helpful?