如何使用Dynamic Array函数在Excel中重新设计列到矩阵

发布于 2025-02-10 17:55:06 字数 707 浏览 3 评论 0原文

我有一个带有一些列数据的Excel表,我想使用Mmult功能将其用于某些矩阵乘法。为此,我需要首先重塑列数据。我想使用动态数组函数进行重塑进行重塑,因为然后可以直接进入Mmult功能,而无需实际在表中显示重塑矩阵(即仅将列保留在用户可见的输入数据)。我知道诸如此处概述的想法 http://www.cpearson.com/excel /vectortomatrix.aspx 但是,据我所知,这需要在我不想要的表格中显示重塑数据。一种替代方法可能是使用卷曲括号直接进入公式中的数组,但是据我所知,该符号不允许允许单元引用,即类似于mmult({a1,a1,a2,a3; a4; a4; a4,a5,a6}) ,{a7,a8; a9,a10; a11,a12})不允许。解决这个问题的想法吗?

一个示例如下所示,基本上我的工作表中有列数据,但是不想重复数据(作为重塑数据),但是,我仍然希望能够显示重塑矩阵的平方。

重塑数据和矩阵乘法:

I have an excel sheet with some column data that I would like to use for some matrix multiplications using MMULT-function. For that purpose I need to reshape the column data first. I would like to do the reshaping using a dynamic array function since that could then feed directly into the MMULT function without having to actually display the reshaped matrix in the sheet (i.e. keeping only the column with the input data visible for the user). I am aware of ideas such as the one outlined here http://www.cpearson.com/excel/VectorToMatrix.aspx however however as far as I can see that requires having the reshaped data displayed in the sheet which I do not want. An alternative could be to enter the arrays directly in the formula using curly brackets, however as far as I can see this notation does not allow cell-references, i.e. something like MMULT({A1,A2,A3;A4,A5,A6},{A7,A8;A9,A10;A11,A12}) is not allowed. Any ideas for solving this issue?

An example is shown below, basically I have the column-data in my sheet, but do not want to repeat the data (as reshaped data), however, I would still like to be able to do display the square of the reshaped matrix.

Reshaped data and matrix multiplication:
enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜未央樱花落 2025-02-17 17:55:06

用于重塑9x1数组中3x3数组:

index(b3:b11,sequence(rows(b3:b11)/3,3))

For reshaping a 9x1 array into a 3x3 array:

INDEX(B3:B11,SEQUENCE(ROWS(B3:B11)/3,3))

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文