Info

此问题已关闭。 请重新打开它进行编辑或回答。

What is happening to my in-line complex transpose

1 次查看(过去 30 天)
I've noticed a strange behavior in some matlab code and would like to know what is happening.
I have a large valued complex array (a) and small valued complex array (b). At one point in the code the operation a' * b occurs. This is done in a loop and I wanted to move the complex transpose outside the loop.
e.g.
aTrans = a';
for
aTrans * b;
end
However, this produces a different result than a' * b (although very small difference) and the in-line transpose is actually faster.
Why?
  3 个评论
Jeff
Jeff 2014-8-20
These test values show the result on my PC running 2013a
bigArray = complex(rand(10000, 90) .* 80 + 40, rand(10000, 90) .* 80 + 40); arrayTwo = complex(rand(10000, 1).* .001 + .0001, rand(10000, 1).* .001 + .0001);
Geoff Hayes
Geoff Hayes 2014-8-21
Jeff - can we see all of your code rather than the incomplete portion from above? What is happening in the for loop?

回答(0 个)

产品

Community Treasure Hunt

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

Start Hunting!

Translated by