How to use a variable as numerical input for FindValue?
mtirwin
Hi, I've been struggling with what I think is a relatively simple problem, but I'm having trouble with the implementation. I would like to take a user's input and then find that value in a wave with a tolerance of 1 unit. For example, if I wanted to do this for a value of 10 and a tolerance of 1, I've been able to use:
FindValue /T=1 /V=10 WavetoSearch
I'm now trying the following:
Variable input1
Prompt input1, "What value do you want to look up?"
DoPrompt "Input value", input1
FindValue /T=1 /V=($input1) WaveToSearch
Prompt input1, "What value do you want to look up?"
DoPrompt "Input value", input1
FindValue /T=1 /V=($input1) WaveToSearch
I think there's an issue with my syntax, but for the life of me I can't figure out what I'm missing. Could you please provide a few hints?
You want just "/V=(input1)"
The syntax you are using, with the $, is for cases where you have a string variable containing the name of a variable and that variable contains the value.
May 7, 2021 at 03:31 pm - Permalink
In reply to You want just "/V=(input1)" … by johnweeks
Thanks so much John, this fixed the issue immediately.
May 8, 2021 at 10:12 am - Permalink