Respondida
error LNK2019: unresolved external symbol when compiling MEX
You mention a library file FDT2XX.lib but I don't see you use it. Do the functions in ftci.cpp depend on this library? If so, tr...

casi 13 años hace | 1

Respondida
ndfun doesnt support complex numbers..
Try this FEX submission by Bruno Luong: http://www.mathworks.com/matlabcentral/fileexchange/27680-multiple-eigen-values-for-2...

casi 13 años hace | 0

Respondida
Mex file Fortran 77, create vector of size input argument
Basic code outline with no error checking: mwPointer, external :: mxGetPr mwSize, external :: mxGetNumberOfElements m...

casi 13 años hace | 0

| aceptada

Respondida
Error using .* Matrix dimensions must agree. HELP
Hint: Look at size(kR) and size(phi). You also need to look at the other lines for your use of * vs .* operation, since it looks...

casi 13 años hace | 0

Respondida
Return (large) unchange mxArray from MEX
plhs[0] = prhs[0] is perfectly OK in mex programming. MATLAB *always* (EDIT: NOT TRUE ... SEE BELOW) makes shared data copies of...

casi 13 años hace | 4

| aceptada

Respondida
Building Mex file with Fortan
Your main problem is that you need to *create* the output array PLHS(1) before you access it. Also your NLHS and NRHS types are ...

casi 13 años hace | 0

| aceptada

Respondida
How do I access an Invalid-named variable from an exported MAT file that MATLAB will not recognize?
You can try this FEX submission: http://www.mathworks.com/matlabcentral/fileexchange/42274-loadfixnames-loads-a-mat-file-fixi...

casi 13 años hace | 1

Respondida
Reading all variable from a mat file.
The new version of LOADFIXNAMES is now available on the FEX. You can find it here: http://www.mathworks.com/matlabcentral/fil...

casi 13 años hace | 0

Respondida
How to multiply Multidimensional Arrays with a column vector
C = mtimesx(A,reshape(B,1,1,[])); You can find MTIMESX here: http://www.mathworks.com/matlabcentral/fileexchange/25977-mti...

casi 13 años hace | 0

Respondida
How to load a file or variable with pure number names, such as 001.mat?
You can try this FEX submission: http://www.mathworks.com/matlabcentral/fileexchange/42274-loadfixnames-loads-a-mat-file-fixi...

casi 13 años hace | 0

Respondida
Mex function with function as input
I am not sure what your question is. Are you simply asking how to fill the 2nd argument in the hcubature call? If so, simply wri...

casi 13 años hace | 1

Respondida
Uniform distribution of floating point numbers in double arithmetics.
First look up the floating point bit pattern, which you can find here: http://en.wikipedia.org/wiki/IEEE_754-1985 Then not...

casi 13 años hace | 1

| aceptada

Respondida
Fix problem when mex .cpp file
Looks like you have spaces in your paths. Rather than passing these arguments to the mex function via the command line "string" ...

casi 13 años hace | 0

Respondida
Rounding using 'fix'... possibly a bug?
To see what is going on you can examine the exact floating point values. Note that none of your original numbers except 0.5 can ...

casi 13 años hace | 2

| aceptada

Respondida
Row/Col major order in mex function
Other things being equal, the fastest way is to access the data in the order that it is physically stored in memory. This makes ...

casi 13 años hace | 1

| aceptada

Respondida
why not 10^-3*10 = 10^-2? or why (10^-3 *10 < 10^-2) returns true? How to deal with this?
Floating point arithmetic is in general not exact. Your 10^-16, for instance, cannot be represented exactly in IEEE double preci...

casi 13 años hace | 1

Respondida
Large numbers multiplied by small numbers
Some options: 1) Use the symbolic toolbox 2) Work with the log of the expression If I have done the math correctly, ...

casi 13 años hace | 1

| aceptada

Respondida
Issue using memset in mex function
1) Include string.h as already suggested by dk. 2) You don't need to zero out the memory behind the data pointer returned by ...

casi 13 años hace | 2

Respondida
ode45 function Not enough input arguments error.
FYI the doc says 1st argument to ode45 is supposed to be a function handle, not a string (although a string also seems to work)....

casi 13 años hace | 1

| aceptada

Respondida
using MEX file and constants
One way: #include <math.h> Then use M_PI for the value in your code instead of PI, or you could add this line also: ...

casi 13 años hace | 0

| aceptada

Respondida
Finding velocity given horizontal position, vertical position and time coordinates and definition of derivative.
Some hints: Import the data into MATLAB. Look at the doc for the function called diff.

casi 13 años hace | 0

Respondida
How do i create a mex file from a C++ source codes that is an int main ( ) function
Looks like you called main before it was declared. Try putting this prototype at the top of your code (prior to the mexFunction)...

casi 13 años hace | 1

| aceptada

Respondida
Why is diag faster than zeros?
More discussion related to this can be found on this thread: <http://www.mathworks.com/matlabcentral/answers/58055-faster-way...

casi 13 años hace | 0

| aceptada

Respondida
Create An Array That Contains All the Values of F(x)? Help!
y = x; y(y<1) = 1; y = y.*x;

casi 13 años hace | 0

Respondida
Matlab code for Maclaurin series expansion using cos(x) =1 and iterating adding a term at a time until I have an estimate for Cos(pi/3)?
Google Maclaurin expansion of cosx Go to the first link http://blogs.ubc.ca/infiniteseriesmodule/units/unit-3-power-series...

casi 13 años hace | 0

Respondida
Matlab mex function problem
Problem 1) If nlhs == 2 then there are only two elements allocated for the output, plhs[0] and plhs[1]. You are overwriting t...

casi 13 años hace | 2

| aceptada

Respondida
Create a vector name from two integer variables
<http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F>

casi 13 años hace | 2

Cargar más