Filter löschen
Filter löschen

Conditional plotting for a dataset?

13 Ansichten (letzte 30 Tage)
farkab95
farkab95 am 13 Nov. 2017
Kommentiert: Walter Roberson am 2 Mär. 2021
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 Kommentare
Navonil Sarkar
Navonil Sarkar am 2 Mär. 2021
Bearbeitet: Navonil Sarkar am 2 Mär. 2021
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 am 2 Mär. 2021
temp = x;
temp(mod(temp, 1)~=0) = nan;
plot(temp, y)

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 13 Nov. 2017
temp = concentration;
temp(temp <= 0.07) = nan;
plot(time, temp)

Weitere Antworten (0)

Kategorien

Mehr zu Graphics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by