If my K matrix is [17X17] and I want to divide it by a column matrix F=[17X1] how do I do that?

1 次查看(过去 30 天)
Matrix division

回答(1 个)

Roger Stafford
Roger Stafford 2016-10-25
I believe the most likely division you are asking for would divide element-wise the elements of each column of K by those of the single column in F. The result would be 17 by 17 in size. For that you should use the bsxfun function which is described at:
https://www.mathworks.com/help/matlab/ref/bsxfun.html
and would be:
bsxfun(@rdivide,K,F)
If you desire matrix division, which is a very different operation, you would need to convert F to a row vector and use the slash (/) operator:
K/F.
The result would be a 17 by 1 column vector.

类别

Help CenterFile Exchange 中查找有关 Operators and Elementary Operations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by