MATLAB中函数inv()的源代码 [英] source code of function inv() in MATLAB

查看:1896
本文介绍了MATLAB中函数inv()的源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的专家,我需要这个函数的源代码:inv(Matrix mat)返回倒置垫。这是一种紧急情况,我没有太多时间。谁能告诉我代码?

提前谢谢。

Dear experts, i need the source code of this function: inv(Matrix mat) that returns the inverted mat. It's sort of emmergency, i don't have much time. could anybody show me the code?
Thank you in advance.

推荐答案

1。如果您想要Matlab源代码然后在Matlab网站上询问,我们不提供订购代码。

2.这里没有人对您说这是紧急情况留下深刻印象,我们有自己的优先事项。

3.如果你没有太多时间,那么你应该学会更好的计划。
1. If you want Matlab source code then ask at the Matlab site, we do not provide code to order.
2. No one here is impressed by you saying "it's an emergency", we have our own priorities.
3. If you don't have much time then you should learn to plan better.


除了Richard MacCutchan的建议,请看看谷歌。

有关Matrix反演的解释,请参阅 http://en.wikipedia.org/wiki/Invertible_matrix #Methods_of_matrix_inversion [ ^ ]。

对于某些实现,请参阅 http://math.fullerton.edu/mathews/n2003/InverseMatrixMod.html [ ^ ]或许多其他来源...

干杯

Andi
In addition to Richard MacCutchan's advise, have a look on Google.
For explaining Matrix inversion, see http://en.wikipedia.org/wiki/Invertible_matrix#Methods_of_matrix_inversion[^].
For some implementations see http://math.fullerton.edu/mathews/n2003/InverseMatrixMod.html[^] or many other sources...
Cheers
Andi


每当我需要转换一些时从Matlab到C / C ++的算法,我总是经历操作并独立于算法的其余部分实现它们。通过分解它可以使问题更容易处理。



如果你看一下inv()的作用,它真的很简单,但是你必须要做一些实现决策,因为在matlab中向量的处理方式与在C / C ++世界中的处理方式略有不同。因此,你必须通过决定矩阵如何传递给函数或从函数传递(它将看起来像)来绑定问题,然后简单地循环并进行交换操作。
Whenever I need to convert some algorithms from Matlab to C/C++, I always go through the operations and implement them independently of the rest of the algorithm. This makes the problem a lot easier to handle by breaking it down.

If you look at what inv() does, it's really quite simple, but you have to make some implementation decisions because vectors are treated a bit differently in matlab than they are in the C/C++ world. So you have to bind the problem by deciding how your matrix will be passed to/from the function (what it will "look" like), then simply loop and do your swapping operation.


这篇关于MATLAB中函数inv()的源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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