04-13-2009 05:38 PM
When I try to use fminsearch, I get the error message "LabVIEW: The given name does not correspond to a know function, variable, or symbol."
For example, I define a function "testfn" by making an m-file called "testfn.m" containing
and I store it in the current directory, and I make sure that this directory is part of the path. Furthermore, when I try it out, like so
the function does execute, and I get the proper value back. But when I type
I get the error message.
On the other hand, if I type
I get back x= -1.5708, so fminsearch itself seems to be working for me, and I feel like I understand the syntax. I just don't know how to tell it where to look for my function.
Thanks for any help!
Solved! Go to Solution.
04-14-2009 07:40 AM
OK, so I think you're telling me that I have to change the .^ operators with ^, so that the function would be unable to accept 1-D arrays. Is that right?
I change the test function to
and now I get a different error. "A problem occurred in a subVI call."