3N线性方程 [英] 3N linear Equations

查看:76
本文介绍了3N线性方程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给出以下等式:

这将是3N个线性方程式.

It will be 3N linear equations.

每个Aij是一个3x3矩阵. Xj是3x1的未知数.并且bi是已知的3x1矩阵.

Each Aij is a 3x3 matrix. Xj s are 3x1 unknowns. And bi s are known 3x1 matrix.

如何合并3x3矩阵以构建3Nx3N矩阵? 我正在尝试找到解决这个问题的方法.

How can I Combine 3x3 matrix to build a 3Nx3N matrix? I'm trying to find a method to work out this question.

推荐答案

如果在MATLAB中将所有矩阵Aij和向量bi创建为变量,则可以将它们全部放入一个大型方程组AX = b使用方括号和分号通过简单的串联进行.例如,在N = 3时,您可以执行以下操作:

If you have created all of your matrices Aij and vectors bi as variables in MATLAB, you can put them all into one large system of equations AX = b by simple concatenation using square brackets and semicolons. For example, when N = 3, you can do the following:

A = [A11 A12 A13; A21 A22 A23; A31 A32 A33];  %# A 9-by-9 matrix
b = [b1; b2; b3];                             %# A 9-by-1 vector

然后,一旦您解决了方程式系统(使用X = A\b;或其他方法),就可以将X分解成各个3比1的部分.对于N = 3的上述示例,您可以执行以下操作:

Then, once you solve your system of equations (using X = A\b; or some other method), you can break X up into its individual 3-by-1 parts. For the above example of N = 3, you can do the following:

X1 = X(1:3);
X2 = X(4:6);
X3 = X(7:9);

这篇关于3N线性方程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆