필터 지우기
필터 지우기

Conditional plotting for a dataset?

조회 수: 13 (최근 30일)
farkab95
farkab95 2017년 11월 13일
댓글: Walter Roberson 2021년 3월 2일
I would like to make a plot of data where the date is on the x-axis and air concentrations values are in the y-axis. But, I only want to plot the air concentrations that are greater than 0.07. How would I do this?
Thank you.
  댓글 수: 5
Navonil Sarkar
Navonil Sarkar 2021년 3월 2일
편집: Navonil Sarkar 2021년 3월 2일
I want to plot x (independent variable) vs y only for integral values of x in a discrete function! How can this be done?
Walter Roberson
Walter Roberson 2021년 3월 2일
temp = x;
temp(mod(temp, 1)~=0) = nan;
plot(temp, y)

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

채택된 답변

Walter Roberson
Walter Roberson 2017년 11월 13일
temp = concentration;
temp(temp <= 0.07) = nan;
plot(time, temp)

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by