我有A
是8
-矩陣。我想取最後6行並將它們放在第一行和第二行的旁邊,以便矩陣A
變爲2
-by- 32
。如何在matlab中製作一個8乘8的矩陣爲2乘32的矩陣
編輯:
A =
12,6872713121256 12,0602414786595 10,3270660536998 7,80915144314411 10,0045468077317 9,60906828665612 8,31320998311920 6,36510295973004
12,0602414786595 12,6872713121256 12,0602414786595 10,3270660536998 9,38969514490848 10,0045468077317 9,60906828665612 8,31320998311921
10,3270660536998 12,0602414786595 12,6872713121256 12,0602414786595 7,92932345092466 9,38969514490848 10,0045468077317 9,60906828665611
7,80915144314411 10,3270660536998 12,0602414786595 12,6872713121256 5,89043977575553 7,92932345092466 9,38969514490847 10,0045468077317
10,0045468077317 9,38969514490848 7,92932345092466 5,89043977575553 7,90694573827892 7,48897349750382 6,39213878381770 4,80849938907536
9,60906828665612 10,0045468077317 9,38969514490848 7,92932345092466 7,48897349750382 7,90694573827892 7,48897349750382 6,39213878381770
8,31320998311920 9,60906828665612 10,0045468077317 9,38969514490847 6,39213878381770 7,48897349750382 7,90694573827892 7,48897349750382
6,36510295973004 8,31320998311921 9,60906828665611 10,0045468077317 4,80849938907536 6,39213878381770 7,48897349750382 7,90694573827892
丹斯解決方案卻給不了我想要的東西,當我把這個代碼:Ry=reshape(A.',[],2).';
我要保持我的第一行和第二行中出現的地方,我只是想移動其他行(從3到8的行)並將它們放在行1和行2的旁邊,以便行3位於行1的旁邊。行4位於行2的旁邊。行5位於行1的旁邊3 ...第6行在第2和4行旁邊,依此類推......謝謝
搜索「如何重塑在MATLAB矩陣」 – patrik
關於從@丹的回答下面的評論。你能提供兩個矩陣的例子嗎? – Crowley
是的,我會發布他們 – Joe