07-11-2013 10:25 AM
The very first answer in the old thread said that the only allowed data types are float and integer. Is that unclear to you?
In any case, if you don't like the behavior of the formula node, posting here is the incorrect way to express your opinion. Post to the Idea Exchange.
07-11-2013 11:03 AM
@ghighuphu wrote:
p.s. This thread is not LV-version dependent and the question is not answered or is unclear, IMHO. Therefore, I decided to post and update. Please, suggest automatic locking of threads older than X years to administrators of the forum, if you feel there is a need for it.
Your message came across as very negative that you were arguing with Altenbach when he was only stating the facts.
I don't disagree with you that it would be good if the formula node would be able to handle complex functions as well. I disagree that the formula node is "state of the art" in LV 12. The formula node was an important development in LabVIEW (I don't know in what version it was added), but it was never intended to do everything. For more advanced math using equation-like calculations, the mathscript node and connections to Matlab were developed.
As Dennis stated, a better place to suggest an improvement to LabVIEW is in the idea exchange rather than reviving a 6-1/2 year old thread with negative responses to messages that were trying to assist the original poster. If you suggest formula nodes should be able to handle complex numbers, post the idea, a large enough group of people may agree by voting it up with kudoes. That will let NI know that there is strong desire for the formula node to be improved.
ghighuphu wrote:
but sqrt does not allow for "DBL -> sqrt -> CDB" conversion. So, your suggestion cannot be implemented.
It certainly can. You can convert a DBL to a CDB before feeding it to the sqrt function by using the conversion bullet in the Numeric >> Conversion palette on the wire before it goes into the square root function.
07-11-2013 11:24 AM
@ghighuphu wrote:
My personal example is a "Downhill Simplex nD.vi", which theoretically allows for optimising a real 2D function f(DBL1,DBL2)=DBL, but it does not allow solving complex function f(CDB)=DBL.
OK, so you want a "Downhill Simplex nD.vi" that accepts complex numbers. That's something for the ideas exchange. However, your function is real, only the argument is complex, so I don't quite understand what the fuss is all about. You can actually open the function and look at the code inside. Surprise! It does not use any formula node. So why your obsession with a formula node solution??
It does use formula string parsing, but that's something else entirely. Yes, like the nonlinear fitting and some other optimization functions, it would be nice for the downhill simplex to accept VI models, but that's also something for the ideas exchange. You can easily use the existing code and modify it accordingly. I did years ago. 😄
@ghighuphu wrote:
Some CDB functions are just too complex to be separated to f(DBL1,DBL2) (where CDB=DBL1+iDBL2).
Seperating a CDB function into real components is never complex (no pun ;)), but quite trivial. It never adds excessive complexity so it cannot be solved.
Show us what you are trying to do.