Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Photonics – Chinese

Photonics – Chinese

Topics related to Lumerical and more, in Chinese language.

将两个矩阵首尾相接

    • mawenzhuang
      Subscriber

      请问孙老师,我有两个矩阵一个是41*2  另个是100*2;如何将这两个矩阵构成一个新矩阵且首位相接组成一个141*2的矩阵

    • mawenzhuang
      Subscriber

      首尾相接

       

    • Guilin Sun
      Ansys Employee

      那你应该先定义一个141*2的矩阵,最简单的方法是将这两个矩阵用新的矩阵代替,直接赋值。如果不能代替,那就要分别赋值。假设

      A1是41*2  A2是100*2,A3是141*2的矩阵,可以

      A3(1:41,:)=A1(:,:);

      A3(42:141,:)=A2(:,:)

      : 代表该维所有元素。

Viewing 2 reply threads
  • The topic ‘将两个矩阵首尾相接’ is closed to new replies.
[bingo_chatbox]