MATLAB Answers

How to create an identity matrix with three identical rows each time

2 views (last 30 days)
MICHEL PHILIPE LIOUSSIS
MICHEL PHILIPE LIOUSSIS on 11 Dec 2019
Answered: Image Analyst on 11 Dec 2019
How to create an identity matrix (with let's say 6 columns) with three identical rows each time. Like this:
[ 1 0 0 0 0 0
1 0 0 0 0 0
1 0 0 0 0 0
0 1 0 0 0 0
0 1 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 1 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 0 1
0 0 0 0 0 1
0 0 0 0 0 1]
Thank you in advance.

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by