python - 尝试使用具有未知值(未定义)的变量进行计算
问题描述
例如
A=[array([[45225.35307609, 31425.35307609, 0. ],
[31425.35307609, 45225.35307609, 0. ],
[ 0. , 0. , 35609.38317306]]),
array([[[ 22612.67653804, 15712.67653804, -16220.37580976],
[ 15712.67653804, 22612.67653804, -16220.37580976],
[-16220.37580976, -16220.37580976, 17804.69158653]]])]
exmax=unknown value variable #undefined maybe a better description?
eymax=unknown value variable
exymax=unknown value variable
emax=np.array([[exmax],[eymax],[exymax]])
N = np.dot(A,emax) #(where emax is a 3,1 array set up with three unknown variables)
#N must also equal
N=np.array([[Nx],[0],[0]]) #where Nx is also undefined
我想将 N 值设置为另一个包含类似未定义变量 np.array([[Nx],[0],[0]]) 的值,然后计算 emax 的值。A 列表的每个元素也应乘以 emax 以给出这些 N 值的列表。我不知道 emax 的值,因为我不知道组成它的三个变量的值。我需要能够将 emax 矩阵乘以 A 矩阵的未知值设置为等于 N。而 N 也等于 np.array(([Nx],[0],[0]])。最终我需要能够计算 exmax、eymax、exymax,得到我的 emax 矩阵,同时能够计算 N 中的 NX。在这种非常特殊的情况下,
#N would be
np.array([[Nx],[0],[0]])=np.array([[45225exmax+31425eymax], [31425exmax + 45225eymax], [35609exymax]]) #for the first element in the A list.
这意味着我可以计算 emax 和 Nx。
解决方案
推荐阅读
- python-3.x - 从图像中裁剪矩形纸
- java - Java:无法将 oracle clob 转换为 jsp 中的字符串
- swift - 是否有 Swift 属性,例如为协议设计的 @nonobjc?
- docker - docker容器内的Curl https返回超时
- javascript - Bootstrap 4 导航栏右对齐搜索选项以及注册
- c# - 如何从配置文件中获取值?
- python - 如何在列表Python列表中添加双引号
- django - 模板中的 Django 文本格式
- javascript - 从 JSON API 获取数据(从一台服务器)并在 HTML 上显示(到另一台服务器)
- postgresql - 为什么 psql 对 -h 参数什么都不做?