Matrix dimensions must agree?

1 view (last 30 days)
Jacob
Jacob on 5 Feb 2016
Edited: Stephen23 on 5 Feb 2016
a = [-14.5i 8.0i 4.0i 2.5i];
b = [8.0i -17i 4.0i 5.0i];
c = [9.0i 4.0i -8.8i 0.0i];
d = [2.5i 5.0i 0.0i -8.3i];
Y = [a;b;c;d];
i3 = 0-1i;
i4 = .44 - .44i;
e = [0+0i 0+0i i3 i4];
I = (e);
F = inv(Y);
V= F.*I;

Answers (1)

Star Strider
Star Strider on 5 Feb 2016
See if replacing:
V= F.*I;
with:
V = bsxfun(@times, F, I);
does what you want.
  2 Comments
Star Strider
Star Strider on 5 Feb 2016
Jacob’s ‘Answer’ moved here:
SHANK YOU!!!
Star Strider
Star Strider on 5 Feb 2016
My pleasure!
If my Answer solved your problem, please Accept it.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!