MatLab + Vicon SDK plot the values
古いコメントを表示
Hi guys, first time and mu knowledge in matlab is small, but i will try to expose my question as clear as possible.
I want to plot my data that comes out from the vicon system in real time, the current code i have i can achive this but from the 21 markers the plot values erase the previous values and I'm just interested in the 4 markers.
The Output_GetMarkerGlobalTranslation.Translation 1 is my X; 2 is my Y and 3 is my Z.
I just want the Y from marker 2,3 and 5,6. But i want to plot the 4 markers(y values only at the same time.
I attached the entire code if it helps.
% Count the number of markers
MarkerCount = MyClient.GetMarkerCount( SubjectName ).MarkerCount;
fprintf( ' Markers (%d):\n', MarkerCount );
for MarkerIndex = 0:typecast( MarkerCount, 'int32' )-1
% Get the marker name
MarkerName = MyClient.GetMarkerName( SubjectName, typecast( MarkerIndex,'uint32') ).MarkerName;
% Get the marker parent
MarkerParentName = MyClient.GetMarkerParentName( SubjectName, MarkerName ).SegmentName;
% Get the global marker translation
Output_GetMarkerGlobalTranslation = MyClient.GetMarkerGlobalTranslation( SubjectName, MarkerName );
fprintf( ' Marker #%d: %s (%g, %g, %g) %s\n', ...
MarkerIndex, ...
char( MarkerName ), ...
Output_GetMarkerGlobalTranslation.Translation( 1 ), ...
Output_GetMarkerGlobalTranslation.Translation( 2 ), ...
Output_GetMarkerGlobalTranslation.Translation( 3 ));
%Plot
bar([mean(Output_GetMarkerGlobalTranslation.Translation( 1 )) mean(Output_GetMarkerGlobalTranslation.Translation( 2 )) mean(Output_GetMarkerGlobalTranslation.Translation( 3 ))])
xlabel( 'MarkerName' );
1 件のコメント
Pedro Saraiva
2020 年 8 月 13 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Scatter Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!