MATLAB: Do I receive an “Undefined function or method ‘c’ for input arguments of type ‘char’.” error when using the function KX in the Datafeed Toolbox

Datafeed Toolboxjdbcjdbc.jarkxkx.jar

I am trying to run the KX function as follows:
q = kx('localhost',5013);
but I receive the following error,
??? Undefined function or method 'c' for input arguments of type 'char'.
Error in ==> C:\MATLAB\R2008a\toolbox\datafeed\datafeed\@kx\kx.p>kx at 51

Best Answer

This is happening because a required JAR file has not been added to the Java class path, as explained in the documentation for the Datafeed Toolbox,
as well as in the Kx documentation,
In order to resolve this issue...
1) First, obtain the "jdbc.jar" file from the above link to Kx Systems's documentation. If you are using an earlier version of Kx kdb+, you can download the attached "kx.jar" file and use it instead of the "jdbc.jar" file.
2) Then add the JAR file to the MATLAB Java class path. The following example code illustrates how to add "jdbc.jar" (from "c:\q\java") to the MATLAB Java class path:
javaaddpath c:\q\java\jdbc.jar