Error with symbolic summation of complex matrixes

1 view (last 30 days)
Hi,
I have an issue with a symbolic summation of complex matrices..
In particular, I have defined two matrixes in a symbolic way:
A=(exp(1i*norm(r))./(norm(r).^3)).*(((1-1i*norm(r))./(norm(r).^2))
B=(exp(1i*norm(r))./norm(r).^3).*((cross(r,cross(p,r))));
A and B are 3x1 complex matrixes.
If I perform summation in a symbolic way C=plus(A,B); and then replace symbols by numbers the result is wrong...
Contrary to that, if I calculate it in numbers, first A and then B, and then sum up them - the result is correct...
Does anyone face with such kind of problem? What is wrong with the "plus" operator when I do it in a symbolic way?
Thank you!

Answers (0)

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!