'Domain error. To compute complex results from real x, use 'acos(complex(x))' error in matlab?
Show older comments
hi.i want to simulate ur10 inverse kinematic and I did it.while running there is this error:
Domain error. To compute complex results from real x, use 'acos(complex(x))
how can I fix it?
the error is general and I don't know which line should be changed. there are several acos in the code .
X is the endeffector position and it can not be complex.
I have attached the Simulink file.
2 Comments
Walter Roberson
on 12 Aug 2018
Change them all.
Sebastian Castro
on 13 Aug 2018
Edited: Sebastian Castro
on 13 Aug 2018
Unfortunately, "changing them all" wouldn't help in this case.
It actually doesn't have to do with the input being complex, but rather the input being outside the real valued range [-1,1] of the cos function.
Refer to my Answer below.
Accepted Answer
More Answers (0)
Categories
Find more on Simscape Multibody in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!