I have an algorithm in C++ that uses Kalman Filter. Somewhere in the code a predict a Quaternion q' and then I update the Quaternion with Kalman Filter q.
I want to plot two graphics in Matlab with the evolution of the predicted quaternion and the corrected(updated) quaternion so I am using "engine.h" library to send quaternion info to Matlab during processing (actually what I send is a 4x1 matrix).
So my question is: What is the best way to plot a quaternion in Matlab so I can visually extract information? Is it maybe better to plot the angles separately?
I think a good option is sending the quaternion as a vector to MATLAB, using C++ MATLAB engine
Then, in MATLAB environment you can use a toolbox for translating to Euler Angles, which is a common visual option.
For adding a path of a toolbox in matlab engine:
With spincalc toolbox, converting would be something like this: