Info

This question is closed. Reopen it to edit or answer.

What is happening to my in-line complex transpose

1 view (last 30 days)
Jeff
Jeff on 20 Aug 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
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 Comments
Jeff
Jeff on 20 Aug 2014
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 on 21 Aug 2014
Jeff - can we see all of your code rather than the incomplete portion from above? What is happening in the for loop?

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!