07-14-2010 11:10 AM
I was going to add a suggestion about the in-range operator until I saw that Bill posted that so now let me argue against me own idea infavor of your version Tbob.
Replace the "0" with "NaN" and then the chart will not be "lying" to us (the values really aren't zero so don't display anything).
Ben
07-14-2010 12:28 PM
@Ben wrote:
Replace the "0" with "NaN" and then the chart will not be "lying" to us (the values really aren't zero so don't display anything).
Ben
Point well taken. It depends upon what the OP wants to see. In reality, if one would apply a diode in series with an AC signal to capture the positive section, an oscilloscope would show the zeros. It would look similar to my VI's graph. So it depends upon what the user really wants and how it is to be processed.
07-14-2010 12:35 PM - edited 07-14-2010 12:35 PM
However, you cannot use the NaN as the input to the In Range and Coerce. The result is all NaN. So a second step is required to replace the zeros with NaN.
Lynn
07-14-2010 12:39 PM
@johnsold wrote:
However, you cannot use the NaN as the input to the In Range and Coerce. The result is all NaN. So a second step is required to replace the zeros with NaN.
Lynn
I agree.
That is why I "argued against myself" regarding using the in-range function and started build a case for Tbob's approach.
Ben
07-14-2010 12:53 PM - edited 07-14-2010 12:54 PM
The OP needs to speak up. I think Ravens Fan's approach is best. When viewing a graph, I would want to see a continuous line (with 0's). But if processing only positive values, then maybe the graph doesn't matter and spaces between sections is OK.
Actually, I think the OP has a solution he is satisfied with and will never return. So we are arguing amongst ourselves never to know what the original intent really was.
07-14-2010 01:16 PM
@tbob wrote:
The OP needs to speak up. I think Ravens Fan's approach is best. When viewing a graph, I would want to see a continuous line (with 0's). But if processing only positive values, then maybe the graph doesn't matter and spaces between sections is OK.
Actually, I think the OP has a solution he is satisfied with and will never return. So we are arguing amongst ourselves never to know what the original intent really was.
There is no harm in padding out a thread with other suggestions. The OP may not care but somebody in the future may need the alternative.
Ben