I am trying to write a code that calculates the hysteresis window for my Schmitt trigger /comparator. When I try to get the expression through calculator and "intersect" function it gives a wavefrom and I am not sure how to obtain the co-ordinates fo the waveform. If I can obtain a list/co ordinates I can calculate the hysteresis by just sobtracting the two x-coordinates. I am struggling with this waveform object for a long time and not able to figure out the way. It happens with many functions of calculator that you will end up with waveform whose co-ordinates are not available in list form. Please let me know how to obtain this wave co crdinates in number format lists or something on which I can do some mathmatical processing.
There's nothing wrong with the syntax. There's no missing "then".
The if function can be used without then and else - e.g. if you do if(condition thenExpression elseExpression) (i.e. if there's a single expression). In my code I'm using progn() to group multiple expressions into one). This is more of the LISP way of doing things.