I want creating MEX function in C/C++ and return struct data type to Matlab. This code can create struct data type with some of variable have int, double, string and matrix (array) data type. We need to use “mxCreateStructArray” matlab function to create struct data in C/C++ and return that struct data type to Matlab.
I want to create gaussian window program in C/C++. I have checked at Matlab and they give gausswin function to create gaussian window. I have checked gausswin Matlab source code and convert that code to C/C++. The coefficients of a Gaussian window are computed from the following equation: where –(N – 1)/2 ≤ n ≤ (N – 1)/2 and α is inversely proportional
I have created a simple computation using Matlab using command : >> (0.1450-0.002)/0.002 ans = 71.5000 Nothing wrong with the result. But, try to change data precision format and try to retype command above. we will get Matlab data precision problem from this simple computation. >> format long >> (0.1450-0.002)/0.002 ans = 71.499999999999986 We get
We can get java used in Matlab by type “version -java” in Matlab command window. I have use Matlab R2013a, the java version in this Matlab version is : >> version -java ans = Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode This is the output after I change the