MATLAB Answers

Centering Matrix Culumn Data

11 views (last 30 days)
Wahyu A
Wahyu A on 18 Jan 2021
Commented: Wahyu A on 19 Jan 2021
Hy, Everyone. I tried print data matrix in the command windows MATLAB and the results are not centered with numbers.
can anyone help me to fix this ? :)
Thanks :)

  0 Comments

Sign in to comment.

Accepted Answer

madhan ravi
madhan ravi on 18 Jan 2021
ii = 33
ii = 33
x = randi([0, 1], 4) * ii % they are automatically centered xD
x = 4×4
0 0 0 33 0 0 0 33 0 0 33 0 0 0 0 33

  1 Comment

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!

Translated by