Skip to content

Commit

Permalink
octave - check type
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9k committed Jan 21, 2023
1 parent 004bbfa commit bbf0df4
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions octave/type_check.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
x = 3
isinteger(x)
isfloat(x)
isvector(x)
isscalar(x)
isnumeric(x)

x = 23.54
isinteger(x)
isfloat(x)
isvector(x)
isscalar(x)
isnumeric(x)

x = [1 2 3]
isinteger(x)
isfloat(x)
isvector(x)
isscalar(x)
isnumeric(x)

x = 'not a number'
isinteger(x)
isfloat(x)
isvector(x)
isscalar(x)
isnumeric(x)

0 comments on commit bbf0df4

Please sign in to comment.