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 个评论
Jan
2016-10-25
What do you expect as result? Please post a small example, because the wanted procedure is not uniquely defined.
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Operators and Elementary Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!