科迪
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices.
Example input/output pairs:
=============
Input: 1,2
Output: [2,3]
Input: 2,2
Output: [2 3; 3 4]
Input: 3,2
Output: [2,3; 3 4; 4 5]
Marginally related: my "outer.m" on FileExchange.
Additional test cases have been added.
Most nonzero elements in row
6215 Solvers
Pascal's Matrix
190 Solvers
Triangle sequence
2833 Solvers
Product of elements in row
211 Solvers
Counting down
解决356
Are you in or are you out?
201 Solvers
Is my wife right?
16069 Solvers
Factorize THIS, buddy
1061 Solvers
So many choices
410 Solvers
Kaprekar numbers
244 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office