How to create a matrix B=[bij]=[max(i,j)] belongs to class of rectangular matrices

2 views (last 30 days)
Please answer me

Accepted Answer

Birdman
Birdman on 9 Feb 2018
One way is symbolical:
i=3;j=4;
B=sym('B',[i j])

More Answers (1)

Christine Tobler
Christine Tobler on 12 Feb 2018
Focusing on the max(i, j) part, you could use
i = 3;
j = 4;
B = max((1:i)', (1:j));

Community Treasure Hunt

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

Start Hunting!