titles ?
4 posts
• Page 1 of 1
titles ?
Absolute beginners question. Can't find the answer in "Mastering Dyalog APL".
Have a matrix 'test' :
test←5 2 12⍴120 ? 200
defined a column title 'titles' :
titles←'Jan' 'Feb' 'Mar' 'Apr' 'May' 'Jun' 'Jul' 'Aug' 'Sep' 'Oct' 'Nov' 'Dec'
I simply can not figure out how I can have the 'titles' above the matrix.
Very nice would be if someone could show me this and even better , how to add
row titles.
----------------------Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
jaar 2010 | Machine 1
======= | Machine 2
jaar 2011 | Machine 1 DATA HERE
======= | Machine 2
etc.
Thanks for your time.
Henk.
Have a matrix 'test' :
test←5 2 12⍴120 ? 200
defined a column title 'titles' :
titles←'Jan' 'Feb' 'Mar' 'Apr' 'May' 'Jun' 'Jul' 'Aug' 'Sep' 'Oct' 'Nov' 'Dec'
I simply can not figure out how I can have the 'titles' above the matrix.
Very nice would be if someone could show me this and even better , how to add
row titles.
----------------------Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
jaar 2010 | Machine 1
======= | Machine 2
jaar 2011 | Machine 1 DATA HERE
======= | Machine 2
etc.
Thanks for your time.
Henk.
- hbarkhof
- Posts: 44
- Joined: Mon Apr 09, 2018 8:37 am
Re: titles ?
How about:
- Code: Select all
years←2010+⍳5
months←'jan' 'feb' 'mar' 'apr' 'may' 'jun' 'jul' 'aug' 'sep' 'oct' 'nov' 'dec'
test←5 2 12⍴120 ? 200
((⊂''),months)⍪(,(⍪'jaar '∘,¨⍕¨years),⊂9⍴'='),((2×≢years),≢months)⍴test
jan feb mar apr may jun jul aug sep oct nov dec
jaar 2011 1 178 30 59 66 11 86 146 139 116 131 153
========= 155 193 173 183 133 49 134 165 75 62 128 115
jaar 2012 19 182 97 85 191 91 142 127 98 122 194 57
========= 159 2 56 176 37 171 7 140 68 82 111 189
jaar 2013 80 52 60 154 24 117 83 74 54 107 172 42
========= 157 93 186 28 35 22 190 58 195 39 196 150
jaar 2014 69 104 114 65 197 5 137 132 14 136 125 95
========= 118 17 50 99 72 175 55 13 100 200 27 41
jaar 2015 192 152 112 70 78 168 177 126 23 47 149 88
========= 40 43 141 45 174 145 185 44 3 10 143 90
-
Morten|Dyalog - Posts: 453
- Joined: Tue Sep 09, 2008 3:52 pm
Re: titles ?
Hi Morten.
After how many years of APL-experience a person can shake
this out of the sleeve ? hi hi !!
Thanks a lot !
Henk.
After how many years of APL-experience a person can shake
this out of the sleeve ? hi hi !!
Thanks a lot !
Henk.
- hbarkhof
- Posts: 44
- Joined: Mon Apr 09, 2018 8:37 am
Re: titles ?
Well, I now have 40 years of experience with APL. However, I often feel that I learned 99% of what I know in the first year or so ;-)
-
Morten|Dyalog - Posts: 453
- Joined: Tue Sep 09, 2008 3:52 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group