Lyna Posted December 28, 2018 Share Posted December 28, 2018 Hi, Referring to the given example, '$condition.transformToSamples($capsule -> sample($capsule.getStart(), $capsule.duration()), 1d)', how do I plot the starting value instead of the duration? Thank you. Link to comment Share on other sites More sharing options...
Seeq Team Sharlinda Salim Posted December 28, 2018 Seeq Team Share Posted December 28, 2018 Hi Lyna, Thank you for your question. In order to plot the starting value, your formula will be like this '$condition.transformToSamples($capsule -> sample($capsule.getStart(), $signal.toScalars($capsule).first()), 1d)'. The command '$signal.toScalars($capsule).first()' will get the first value in each capsules. Alternatively, you can also write it as '$signal.toScalars($capsule).pick()'. Hope this helps. Link to comment Share on other sites More sharing options...
Seeq Team Ben Johnson Posted December 28, 2018 Seeq Team Share Posted December 28, 2018 Getting the value of a signal at the start of each capsule is even easier using the aggregate() function. For example: In R20 $signal.aggregate(Stat.ValueStart, $condition, PositionInCapsule.StartOfCapsule) In R21 $signal.aggregate(startValue(), $condition, startKey()) Link to comment Share on other sites More sharing options...
Seeq Team Nick Gigliotti Posted January 14, 2019 Seeq Team Share Posted January 14, 2019 One additional way to do this would be to use Signal from Condition and the "Value at Start" selection in the summary statistic field. This will give a formula similar to the one described by Ben if you look at the Item Properties of the new signal. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.