Calculationg with quternions Matlab function did not work

2 ビュー (過去 30 日間)
Mark S
Mark S 2021 年 12 月 25 日
編集済み: Mark S 2022 年 1 月 6 日
Hello,
I am having some trouble with my function. I would transform a coordinate vector using Unit Quaternions.
I have written this function:
function p_A = q_transform_coordinate_vector(R_A_B, p_B)
p_A = q_A_B * q_pure(p_B) * q_inv(q_A_B);
end
But this function is not workin. It appears this error message:
Unrecognized function or variable 'q_A_B'.
Error in test_fehler>q_transform_coordinate_vector (line 102)
p_A = q_A_B * q_pure(p_B) * q_inv(q_A_B);
Error in test_fehler (line 47)
p_A = q_transform_coordinate_vector(R_A_B, p_B)
I did get it why I get this error message. Maybe someone can have a look and tell me what I am doing wrong. Thanks :)
.

採用された回答

Jan
Jan 2021 年 12 月 25 日
function p_A = q_transform_coordinate_vector(R_A_B, p_B)
% ^^^^^
p_A = q_A_B * q_pure(p_B) * q_inv(q_A_B);
% ^^^^^ ^^^^^^
end
You provide R_A_B as input, but use q_A_B.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVerification, Validation, and Test についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by