|
From: Lars H. <lhe...@us...> - 2007-02-23 15:41:55
|
I came across an interesting problem, and have no (easy) solution for it: I would like to plot a datafile with time/date information date val1 val2 ... date val1 val2 ... date val1 val2 ... but iwant to plot only certain dates. Via either "using" or the ternary operator, I need to compare a date against a given date and take action depending on the result. E.g. if the date from the data file is before Jan 01 2007, don't plot. In simple cases, and if the input can be controlled accordingly, this could be done via data index, but not necessarily in more complex cases. Similarily, I'd like to define a function based on time/date values. E.g. f(x) = ( x < Jan 01 2007 13:00 ? 30 : 40 ) Any ideas how to achieve this? Unless I've missed some documentation, this is probably a nice little project for the post-4.2 era :) |