Python Forum
Creating a circular matrix with one input
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a circular matrix with one input
#15
For those interested, all odd numbers are OK:
No recursion. Number = 9
Paul
Output:
[1, 2, 3, 4, 5, 6, 7, 8, 9] [32, 33, 34, 35, 36, 37, 38, 39, 10] [31, 56, 57, 58, 59, 60, 61, 40, 11] [30, 55, 72, 73, 74, 75, 62, 41, 12] [29, 54, 71, 80, 81, 76, 63, 42, 13] [28, 53, 70, 79, 78, 77, 64, 43, 14] [27, 52, 69, 68, 67, 66, 65, 44, 15] [26, 51, 50, 49, 48, 47, 46, 45, 16] [25, 24, 23, 22, 21, 20, 19, 18, 17]
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Reply


Messages In This Thread
RE: Creating a circular matrix with one input - by DPaul - Oct-01-2020, 09:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with a Matrix nxn with black and white input Rosko 3 2,071 Nov-24-2019, 07:39 AM
Last Post: buran
  Creating a wavelet matrix pingaan 4 2,602 May-26-2019, 06:25 PM
Last Post: heiner55
  define a diagonal matrix from a matrix amalalaoui 1 2,426 May-15-2019, 01:12 PM
Last Post: ichabod801
  Code for a circular wire?? hiphopopot0mous 11 6,852 Dec-03-2017, 06:23 PM
Last Post: micseydel
  Creating lists or arrays as the input nickalvar 4 4,367 May-03-2017, 04:46 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020