필터 지우기
필터 지우기

How to plot components of a cell array?

조회 수: 2 (최근 30일)
Daniel
Daniel 2016년 2월 17일
편집: Azzi Abdelmalek 2016년 2월 17일
I have a cell array looking something like this.
event{event_log} = [1,9,212] [4,12,200] [5,12,180] [6,12,200] [9,15,200] [10,15,200].
The first integer in each vector represents a time stamp, and the second two are events which are correlated with that time stamp, eg [time yaw speed]. event_log is simply a counter adding a new vector each time an event occurs.
How do I make a 3D scatter plot with time on the xaxis, yaw on the y, and speed on the z? Or a plotyy with time on the xaxis, and the other two on the two y axis.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 2월 17일
편집: Azzi Abdelmalek 2016년 2월 17일
w={[1,9,212] [4,12,200] [5,12,180] [6,12,200] [9,15,200] [10,15,200]}
v=cell2mat(w')
plot3(v(:,1),v(:,2),v(:,3))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Two y-axis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by