How to have a dotted line separate a matrix into upper and lower part









up vote
3
down vote

favorite












So, here is what I want to do:
I have created a matrix C and another Matrix D. And I have labelled the columns and rows. Now, I want to join these two matrices together, keeping the labels. But I want - I hope this is posssible - to have a dotted line go through the matrix, indicating where labels 'TX^C' end and where labels 'TX^D' start.



This is what I have so far:



documentclass[a4paper12pt]article
usepackagegeometry
usepackageblkarray
usepackageamsmath
usepackagexcolor
usepackagegraphicx

begindocument

[mathbfJ =
beginblockarraycccccc
RB_1 & RB_2 & RB_3 & dots & RB_m \
beginblock(ccccc)c
1 & 0 & 1 & dots & 0 & TX_1^C \
0 & 1 & 0 & dots & 0 & TX_2^C \
vdots & vdots & vdots & & vdots & \
& & & & & \
0 & 0 & 0 & dots & 1 & TX_max^C \
1 & 0 & 1 & dots & 0 & TX_1^D \
0 & 1 & 0 & dots & 0 & TX_2^D \
vdots & vdots & vdots & & vdots & \
& & & & & \
0 & 0 & 0 & dots & 1 & TX_max^D \
endblock
endblockarray
]

enddocument


Only the dotted line is missing. Alternatively, shading the background of the upper matrix in a light color would be nice as well. I have just read a similar question here. But since I don't know LaTeX so well, I don't know if I want to overcomplicate things by making use of tikz.



Small Edit:
What, if I want two vertical labels? I was trying this, for example:



[mathbfPairs = 
beginblockarraycc
Transmitter & Receiver \
beginblockc(cc)c
TX_1^C & (x,y) & (x,y) & BS \
TX_2^C & (x,y) & (x,y) & BS \
&vdots & vdots \
TX_max^C & (x,y) & (x,y) & BS \
BAhhline......
TX_1^D & (x,y) & (x,y) &RX_1^D \
TX_2^D & (x,y) & (x,y) &RX_2^D \
&vdots & vdots \
TX_ax^D & (x,y) & (x,y) &RX_max^D \
endblock
endblockarray
]









share|improve this question



























    up vote
    3
    down vote

    favorite












    So, here is what I want to do:
    I have created a matrix C and another Matrix D. And I have labelled the columns and rows. Now, I want to join these two matrices together, keeping the labels. But I want - I hope this is posssible - to have a dotted line go through the matrix, indicating where labels 'TX^C' end and where labels 'TX^D' start.



    This is what I have so far:



    documentclass[a4paper12pt]article
    usepackagegeometry
    usepackageblkarray
    usepackageamsmath
    usepackagexcolor
    usepackagegraphicx

    begindocument

    [mathbfJ =
    beginblockarraycccccc
    RB_1 & RB_2 & RB_3 & dots & RB_m \
    beginblock(ccccc)c
    1 & 0 & 1 & dots & 0 & TX_1^C \
    0 & 1 & 0 & dots & 0 & TX_2^C \
    vdots & vdots & vdots & & vdots & \
    & & & & & \
    0 & 0 & 0 & dots & 1 & TX_max^C \
    1 & 0 & 1 & dots & 0 & TX_1^D \
    0 & 1 & 0 & dots & 0 & TX_2^D \
    vdots & vdots & vdots & & vdots & \
    & & & & & \
    0 & 0 & 0 & dots & 1 & TX_max^D \
    endblock
    endblockarray
    ]

    enddocument


    Only the dotted line is missing. Alternatively, shading the background of the upper matrix in a light color would be nice as well. I have just read a similar question here. But since I don't know LaTeX so well, I don't know if I want to overcomplicate things by making use of tikz.



    Small Edit:
    What, if I want two vertical labels? I was trying this, for example:



    [mathbfPairs = 
    beginblockarraycc
    Transmitter & Receiver \
    beginblockc(cc)c
    TX_1^C & (x,y) & (x,y) & BS \
    TX_2^C & (x,y) & (x,y) & BS \
    &vdots & vdots \
    TX_max^C & (x,y) & (x,y) & BS \
    BAhhline......
    TX_1^D & (x,y) & (x,y) &RX_1^D \
    TX_2^D & (x,y) & (x,y) &RX_2^D \
    &vdots & vdots \
    TX_ax^D & (x,y) & (x,y) &RX_max^D \
    endblock
    endblockarray
    ]









    share|improve this question

























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      So, here is what I want to do:
      I have created a matrix C and another Matrix D. And I have labelled the columns and rows. Now, I want to join these two matrices together, keeping the labels. But I want - I hope this is posssible - to have a dotted line go through the matrix, indicating where labels 'TX^C' end and where labels 'TX^D' start.



      This is what I have so far:



      documentclass[a4paper12pt]article
      usepackagegeometry
      usepackageblkarray
      usepackageamsmath
      usepackagexcolor
      usepackagegraphicx

      begindocument

      [mathbfJ =
      beginblockarraycccccc
      RB_1 & RB_2 & RB_3 & dots & RB_m \
      beginblock(ccccc)c
      1 & 0 & 1 & dots & 0 & TX_1^C \
      0 & 1 & 0 & dots & 0 & TX_2^C \
      vdots & vdots & vdots & & vdots & \
      & & & & & \
      0 & 0 & 0 & dots & 1 & TX_max^C \
      1 & 0 & 1 & dots & 0 & TX_1^D \
      0 & 1 & 0 & dots & 0 & TX_2^D \
      vdots & vdots & vdots & & vdots & \
      & & & & & \
      0 & 0 & 0 & dots & 1 & TX_max^D \
      endblock
      endblockarray
      ]

      enddocument


      Only the dotted line is missing. Alternatively, shading the background of the upper matrix in a light color would be nice as well. I have just read a similar question here. But since I don't know LaTeX so well, I don't know if I want to overcomplicate things by making use of tikz.



      Small Edit:
      What, if I want two vertical labels? I was trying this, for example:



      [mathbfPairs = 
      beginblockarraycc
      Transmitter & Receiver \
      beginblockc(cc)c
      TX_1^C & (x,y) & (x,y) & BS \
      TX_2^C & (x,y) & (x,y) & BS \
      &vdots & vdots \
      TX_max^C & (x,y) & (x,y) & BS \
      BAhhline......
      TX_1^D & (x,y) & (x,y) &RX_1^D \
      TX_2^D & (x,y) & (x,y) &RX_2^D \
      &vdots & vdots \
      TX_ax^D & (x,y) & (x,y) &RX_max^D \
      endblock
      endblockarray
      ]









      share|improve this question















      So, here is what I want to do:
      I have created a matrix C and another Matrix D. And I have labelled the columns and rows. Now, I want to join these two matrices together, keeping the labels. But I want - I hope this is posssible - to have a dotted line go through the matrix, indicating where labels 'TX^C' end and where labels 'TX^D' start.



      This is what I have so far:



      documentclass[a4paper12pt]article
      usepackagegeometry
      usepackageblkarray
      usepackageamsmath
      usepackagexcolor
      usepackagegraphicx

      begindocument

      [mathbfJ =
      beginblockarraycccccc
      RB_1 & RB_2 & RB_3 & dots & RB_m \
      beginblock(ccccc)c
      1 & 0 & 1 & dots & 0 & TX_1^C \
      0 & 1 & 0 & dots & 0 & TX_2^C \
      vdots & vdots & vdots & & vdots & \
      & & & & & \
      0 & 0 & 0 & dots & 1 & TX_max^C \
      1 & 0 & 1 & dots & 0 & TX_1^D \
      0 & 1 & 0 & dots & 0 & TX_2^D \
      vdots & vdots & vdots & & vdots & \
      & & & & & \
      0 & 0 & 0 & dots & 1 & TX_max^D \
      endblock
      endblockarray
      ]

      enddocument


      Only the dotted line is missing. Alternatively, shading the background of the upper matrix in a light color would be nice as well. I have just read a similar question here. But since I don't know LaTeX so well, I don't know if I want to overcomplicate things by making use of tikz.



      Small Edit:
      What, if I want two vertical labels? I was trying this, for example:



      [mathbfPairs = 
      beginblockarraycc
      Transmitter & Receiver \
      beginblockc(cc)c
      TX_1^C & (x,y) & (x,y) & BS \
      TX_2^C & (x,y) & (x,y) & BS \
      &vdots & vdots \
      TX_max^C & (x,y) & (x,y) & BS \
      BAhhline......
      TX_1^D & (x,y) & (x,y) &RX_1^D \
      TX_2^D & (x,y) & (x,y) &RX_2^D \
      &vdots & vdots \
      TX_ax^D & (x,y) & (x,y) &RX_max^D \
      endblock
      endblockarray
      ]






      matrices tikz-matrix






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 10 at 12:53

























      asked Nov 10 at 11:54









      user503842

      705




      705




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          The package blkarray already offers several commands for different lines. One of them is BAhhline where you can define the kind of line



          documentclass[a4paper12pt]article
          usepackagegeometry
          usepackageblkarray
          usepackageamsmath
          usepackagexcolor
          usepackagegraphicx

          begindocument

          [mathbfJ =
          beginblockarraycccccc
          RB_1 & RB_2 & RB_3 & dots & RB_m \
          beginblock(ccccc)c
          1 & 0 & 1 & dots & 0 & TX_1^C \
          0 & 1 & 0 & dots & 0 & TX_2^C \
          vdots & vdots & vdots & & vdots & \
          & & & & & \
          0 & 0 & 0 & dots & 1 & TX_max^C \
          BAhhline......
          1 & 0 & 1 & dots & 0 & TX_1^D \
          0 & 1 & 0 & dots & 0 & TX_2^D \
          vdots & vdots & vdots & & vdots & \
          & & & & & \
          0 & 0 & 0 & dots & 1 & TX_max^D \
          endblock
          endblockarray
          ]

          enddocument


          enter image description here






          share|improve this answer




















          • Thx so much, Ignasi! This is exactly what I want. Just - see my edit - what if I only label the columns and not the rows? It doesn't seem to work the way I am trying to do it. I have included the extra & before the ` , because this is where usually there would be the labels. If I leave the &`, at least I don't get an error. But the left bracket is far to much to the left
            – user503842
            Nov 10 at 12:39











          • hmm... actually, let me correct this: Can you tell me a way of how to have two vertical labels? One on the right and one on the left ?
            – user503842
            Nov 10 at 12:48










          • ok, nevermind. I have opened a new question for this. Thx so much for your help, again!
            – user503842
            Nov 10 at 13:35










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "85"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459295%2fhow-to-have-a-dotted-line-separate-a-matrix-into-upper-and-lower-part%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          The package blkarray already offers several commands for different lines. One of them is BAhhline where you can define the kind of line



          documentclass[a4paper12pt]article
          usepackagegeometry
          usepackageblkarray
          usepackageamsmath
          usepackagexcolor
          usepackagegraphicx

          begindocument

          [mathbfJ =
          beginblockarraycccccc
          RB_1 & RB_2 & RB_3 & dots & RB_m \
          beginblock(ccccc)c
          1 & 0 & 1 & dots & 0 & TX_1^C \
          0 & 1 & 0 & dots & 0 & TX_2^C \
          vdots & vdots & vdots & & vdots & \
          & & & & & \
          0 & 0 & 0 & dots & 1 & TX_max^C \
          BAhhline......
          1 & 0 & 1 & dots & 0 & TX_1^D \
          0 & 1 & 0 & dots & 0 & TX_2^D \
          vdots & vdots & vdots & & vdots & \
          & & & & & \
          0 & 0 & 0 & dots & 1 & TX_max^D \
          endblock
          endblockarray
          ]

          enddocument


          enter image description here






          share|improve this answer




















          • Thx so much, Ignasi! This is exactly what I want. Just - see my edit - what if I only label the columns and not the rows? It doesn't seem to work the way I am trying to do it. I have included the extra & before the ` , because this is where usually there would be the labels. If I leave the &`, at least I don't get an error. But the left bracket is far to much to the left
            – user503842
            Nov 10 at 12:39











          • hmm... actually, let me correct this: Can you tell me a way of how to have two vertical labels? One on the right and one on the left ?
            – user503842
            Nov 10 at 12:48










          • ok, nevermind. I have opened a new question for this. Thx so much for your help, again!
            – user503842
            Nov 10 at 13:35














          up vote
          3
          down vote



          accepted










          The package blkarray already offers several commands for different lines. One of them is BAhhline where you can define the kind of line



          documentclass[a4paper12pt]article
          usepackagegeometry
          usepackageblkarray
          usepackageamsmath
          usepackagexcolor
          usepackagegraphicx

          begindocument

          [mathbfJ =
          beginblockarraycccccc
          RB_1 & RB_2 & RB_3 & dots & RB_m \
          beginblock(ccccc)c
          1 & 0 & 1 & dots & 0 & TX_1^C \
          0 & 1 & 0 & dots & 0 & TX_2^C \
          vdots & vdots & vdots & & vdots & \
          & & & & & \
          0 & 0 & 0 & dots & 1 & TX_max^C \
          BAhhline......
          1 & 0 & 1 & dots & 0 & TX_1^D \
          0 & 1 & 0 & dots & 0 & TX_2^D \
          vdots & vdots & vdots & & vdots & \
          & & & & & \
          0 & 0 & 0 & dots & 1 & TX_max^D \
          endblock
          endblockarray
          ]

          enddocument


          enter image description here






          share|improve this answer




















          • Thx so much, Ignasi! This is exactly what I want. Just - see my edit - what if I only label the columns and not the rows? It doesn't seem to work the way I am trying to do it. I have included the extra & before the ` , because this is where usually there would be the labels. If I leave the &`, at least I don't get an error. But the left bracket is far to much to the left
            – user503842
            Nov 10 at 12:39











          • hmm... actually, let me correct this: Can you tell me a way of how to have two vertical labels? One on the right and one on the left ?
            – user503842
            Nov 10 at 12:48










          • ok, nevermind. I have opened a new question for this. Thx so much for your help, again!
            – user503842
            Nov 10 at 13:35












          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          The package blkarray already offers several commands for different lines. One of them is BAhhline where you can define the kind of line



          documentclass[a4paper12pt]article
          usepackagegeometry
          usepackageblkarray
          usepackageamsmath
          usepackagexcolor
          usepackagegraphicx

          begindocument

          [mathbfJ =
          beginblockarraycccccc
          RB_1 & RB_2 & RB_3 & dots & RB_m \
          beginblock(ccccc)c
          1 & 0 & 1 & dots & 0 & TX_1^C \
          0 & 1 & 0 & dots & 0 & TX_2^C \
          vdots & vdots & vdots & & vdots & \
          & & & & & \
          0 & 0 & 0 & dots & 1 & TX_max^C \
          BAhhline......
          1 & 0 & 1 & dots & 0 & TX_1^D \
          0 & 1 & 0 & dots & 0 & TX_2^D \
          vdots & vdots & vdots & & vdots & \
          & & & & & \
          0 & 0 & 0 & dots & 1 & TX_max^D \
          endblock
          endblockarray
          ]

          enddocument


          enter image description here






          share|improve this answer












          The package blkarray already offers several commands for different lines. One of them is BAhhline where you can define the kind of line



          documentclass[a4paper12pt]article
          usepackagegeometry
          usepackageblkarray
          usepackageamsmath
          usepackagexcolor
          usepackagegraphicx

          begindocument

          [mathbfJ =
          beginblockarraycccccc
          RB_1 & RB_2 & RB_3 & dots & RB_m \
          beginblock(ccccc)c
          1 & 0 & 1 & dots & 0 & TX_1^C \
          0 & 1 & 0 & dots & 0 & TX_2^C \
          vdots & vdots & vdots & & vdots & \
          & & & & & \
          0 & 0 & 0 & dots & 1 & TX_max^C \
          BAhhline......
          1 & 0 & 1 & dots & 0 & TX_1^D \
          0 & 1 & 0 & dots & 0 & TX_2^D \
          vdots & vdots & vdots & & vdots & \
          & & & & & \
          0 & 0 & 0 & dots & 1 & TX_max^D \
          endblock
          endblockarray
          ]

          enddocument


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 10 at 12:20









          Ignasi

          89.8k4162301




          89.8k4162301











          • Thx so much, Ignasi! This is exactly what I want. Just - see my edit - what if I only label the columns and not the rows? It doesn't seem to work the way I am trying to do it. I have included the extra & before the ` , because this is where usually there would be the labels. If I leave the &`, at least I don't get an error. But the left bracket is far to much to the left
            – user503842
            Nov 10 at 12:39











          • hmm... actually, let me correct this: Can you tell me a way of how to have two vertical labels? One on the right and one on the left ?
            – user503842
            Nov 10 at 12:48










          • ok, nevermind. I have opened a new question for this. Thx so much for your help, again!
            – user503842
            Nov 10 at 13:35
















          • Thx so much, Ignasi! This is exactly what I want. Just - see my edit - what if I only label the columns and not the rows? It doesn't seem to work the way I am trying to do it. I have included the extra & before the ` , because this is where usually there would be the labels. If I leave the &`, at least I don't get an error. But the left bracket is far to much to the left
            – user503842
            Nov 10 at 12:39











          • hmm... actually, let me correct this: Can you tell me a way of how to have two vertical labels? One on the right and one on the left ?
            – user503842
            Nov 10 at 12:48










          • ok, nevermind. I have opened a new question for this. Thx so much for your help, again!
            – user503842
            Nov 10 at 13:35















          Thx so much, Ignasi! This is exactly what I want. Just - see my edit - what if I only label the columns and not the rows? It doesn't seem to work the way I am trying to do it. I have included the extra & before the ` , because this is where usually there would be the labels. If I leave the &`, at least I don't get an error. But the left bracket is far to much to the left
          – user503842
          Nov 10 at 12:39





          Thx so much, Ignasi! This is exactly what I want. Just - see my edit - what if I only label the columns and not the rows? It doesn't seem to work the way I am trying to do it. I have included the extra & before the ` , because this is where usually there would be the labels. If I leave the &`, at least I don't get an error. But the left bracket is far to much to the left
          – user503842
          Nov 10 at 12:39













          hmm... actually, let me correct this: Can you tell me a way of how to have two vertical labels? One on the right and one on the left ?
          – user503842
          Nov 10 at 12:48




          hmm... actually, let me correct this: Can you tell me a way of how to have two vertical labels? One on the right and one on the left ?
          – user503842
          Nov 10 at 12:48












          ok, nevermind. I have opened a new question for this. Thx so much for your help, again!
          – user503842
          Nov 10 at 13:35




          ok, nevermind. I have opened a new question for this. Thx so much for your help, again!
          – user503842
          Nov 10 at 13:35

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459295%2fhow-to-have-a-dotted-line-separate-a-matrix-into-upper-and-lower-part%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          What does pagestruct do in Eviews?

          Dutch intervention in Lombok and Karangasem

          Channel Islands