How to make comparison plot in a struct

2 ビュー (過去 30 日間)
Ram Prasanth
Ram Prasanth 2024 年 2 月 12 日
コメント済み: Ram Prasanth 2024 年 2 月 13 日
I have a time series data of Y-position of the vehicle trajectory inside a struct of 1*41 struct.
I want to compare each time step of all the 41 timeseries across.
This is the code i created but its not working. can you help me with these?
Code is:
figure;
for m = 1:41
hold on;
plot(egoStatesRefTrajectory.y(:,1),egoStatesRefTrajectory.y(:,2))
end

採用された回答

VBBV
VBBV 2024 年 2 月 12 日
編集済み: VBBV 2024 年 2 月 13 日
plot(egoStatesRefTrajectory(m).y(:,1),egoStatesRefTrajectory(m).y(:,2))
  7 件のコメント
VBBV
VBBV 2024 年 2 月 13 日
Ok, It seems like data is nested in different structures from which you extract. The problem in your question however is shown in highly simplified form for anyone to comprehend.
Ram Prasanth
Ram Prasanth 2024 年 2 月 13 日
ok thank you very much for your feedback. Next time i will post it in a much detailed manner for better comprehension or understanding of the problem. Thank you @VBBV

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by