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 (edited) 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. Edited December 28, 2018 by Sharlinda Salim 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()) 1 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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now