How can i create array of all -1 numbers in it?

1 view (last 30 days)
  • Item one
  • Item two
  2 Comments
Jan
Jan on 18 Dec 2015
Edited: Jan on 18 Dec 2015
Item one, item two?!
Stephen23
Stephen23 on 20 Aug 2021
X = -ones(3,4)
X = 3×4
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1

Sign in to comment.

Accepted Answer

Jan
Jan on 18 Dec 2015
X = repmat(-1, [3, 4])

More Answers (0)

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!