Matlab逆运算和警告 [英] Matlab inverse operation and warning

查看:126
本文介绍了Matlab逆运算和警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不太清楚这意味着什么. 警告:矩阵对于工作精度至关重要."

Not quite sure what this means. "Warning: Matrix is singular to working precision."

我有一个3x4矩阵,称为矩阵bestM 矩阵Q是bestM的3x3,矩阵m是bestM的最后一列

I have a 3x4 matrix called matrix bestM matrix Q is 3x3 of bestM and matrix m is the last column of bestM

我想做C =-Q *矩阵m的逆矩阵 我得到那个警告 和C = [Inf Inf Inf]这是不对的,因为我正在计算世界上的相机中心

I would like to do C = -Inverse matrix of Q * matrix m and I get that warning and C =[Inf Inf Inf] which isn't right because i am calculating for the camera center in the world

bestM = [-0.0031 -0.0002 0.0005 0.9788;
         -0.0003 -0.0006 0.0028 0.2047;
         -0.0000 -0.0000 0.0000 0.0013];   

Q = bestM(1:3,1:3);
m = bestM(:,4);

X = inv(Q);
C = -X*m;
disp(C);

推荐答案

一个奇异矩阵可以被认为是等效于零的矩阵,当您尝试将0求反时,它会爆炸(变为无穷大),这就是您的本意.到这里.用户1281385对于使用format命令提高精度绝对是错误的; format命令用于更改显示给您的内容的格式.实际上,格式的帮助命令的第一行说

A singular matrix can be thought of as the matrix equivalent of zero, when you try to invert 0 it blows up (goes to infinity) which is what you are getting here. user 1281385 is absolutely wrong about using the format command to increase precision; the format command is used to change the format of what is shown to you. In fact the very first line of the help command for format says

格式不会影响MATLAB计算的完成方式.

format does not affect how MATLAB computations are done.

这篇关于Matlab逆运算和警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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