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!