06-06-2016 06:38 AM
I am trying to implement the formula of the threshold in energy detector spectrum sensing.the formula of the threshold contain the Q inverse function.
Is there some VI or sub VI that I can implement to calculate the inverse Q function.
Thanks in advance.
06-08-2016 10:03 AM
Hi emnajaoua,
Unfortunately, by the look of the support MathScript (M) functions in LabVIEW Communications here: http://www.ni.com/documentation/en/labview-comms/1.0/mnode/mathscript-overview/, there is not an inherent inverse Q function in the M node. Additionally, there is not inherently a VI to do this in LabVIEW Communications either.
However, you can develop your own .m file to create a inverse Q function of your own. By adding a .m file that you create that contains the algorithm for an inverse q function, and saving it in your project, you can call it from MathNodes else where in your code. There's a good example of this in LabVIEW Communications under "File" » "Examples" » "Math" » "MathScript User Defined Function". You could also create a VI that contains the algorithm for an inverse Q function and place that in your code.
Thanks!
BeenCoughin
06-09-2016 01:43 AM
Thank you BeenCoughin , It worked . I have to correct other errors and simulate the whole project and I will let you know of the result.but the Q function that I have imported from matlab is not underlined with red anymore.
Best Regards,
Emna.
06-09-2016 02:04 AM
Hi BeenCoughin,
Just a question .When I run my project that contains the .m script file does it compile it on my matlab(installed in the computer) or on another tool matlab existed in labview communications design ?
06-09-2016 02:28 AM
I get the same error of undefined function.Is it because the function qfuncinv recognized in matlab not recognized in labview or may be because the version of matlab installed in my computer doesn"t have the communications toolbox which contains the function qfuncinv ?
06-09-2016 04:00 AM
Hi again,
I have reinstalled matlab on my computer and verified that my script works by itself on matlab so I guess the mathscript node solution is not suitable with the Q function.
I will go back to the C function and see what can I do with the erfc_inv function.
Thanks for your propositions.
Best ,
Emna.
06-09-2016 09:41 AM
Hi Emna,
Sorry for the difficulties you ran into; we have just a targeted set of libraries, but luckily you should be able to try implementing the function by hand, as BeenCoughin suggested?
For future reference, LabVIEW Communications is stand-alone and does not call into other components! You shouldn't have to do such reinstalls in the future:).
Cheers
06-13-2016 01:52 AM
Hi,
even when I am trying to implement Q inverse function as a separate VI I face a lot of difficulties.Can you help me run this VI .
Thanks,