How to make comparison plot in a struct
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
VBBV
2024년 2월 12일
편집: VBBV
2024년 2월 13일
plot(egoStatesRefTrajectory(m).y(:,1),egoStatesRefTrajectory(m).y(:,2))
댓글 수: 7
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Measurements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!