필터 지우기
필터 지우기

Plot time against numbers

조회 수: 2 (최근 30일)
Ana Campos
Ana Campos 2023년 3월 28일
댓글: Ana Campos 2023년 4월 5일
Hi, I have got the following lines of code:
aa = dataraw_GSR_RELAXING.CREATION_TIME(1:283)
bb = dataraw_GSR_RELAXING.VALUE(1:283)
plot(aa,bb)
aa corresponds to a column with times as is shown in the screenshot below.
bb is a column with the same size but instead of times it has numerical values.
When I try to plot the values against the time, I get a message saying 'Invalid data argument'.
Could someone please teach me how to plot this? I looked into examples from the forum and tried to reproduce but without success.
Thanks in advance for your help.

채택된 답변

Walter Roberson
Walter Roberson 2023년 3월 28일
aa = cell2mat(dataraw_GSR_RELAXING.CREATION_TIME(1:283));
bb = cell2mat(dataraw_GSR_RELAXING.VALUE(1:283));
plot(aa, bb)
  댓글 수: 8
Peter Perkins
Peter Perkins 2023년 4월 5일
Ana, Walter seems to have gotten you back in business, but I will just add that you may have wanted to read your data using readtimetable, not readtable. That would have put you one step closer to that plot.
Ana Campos
Ana Campos 2023년 4월 5일
Hi Peter,
Another tip to add to the list then! Thanks for taking the time to comment too. I’ll keep that in mind for when I need it next. Cheers!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by