Answered
How does matlab normalize its eigenvectors?
If "... not matching up ..." just means that the ordering is different, you might look into this FEX submission by John D'Errico...

13 years ago | 0

Answered
What's the meaning of mmult in matlab
You might also look at this FEX submission by Bruno Luong: <http://www.mathworks.com/matlabcentral/fileexchange/27950-mmtimes...

13 years ago | 0

Answered
What happens when Matlab exits C-Mex program after a pointer was overridden
1. It doesn't matter what value pA holds when the mex file exits. These addresses are being kept track of by the MATLAB Memory M...

13 years ago | 2

Answered
Access value in cell arrays
Another variation: x = [A{:,1}]; B = [x.str];

13 years ago | 1

Answered
converting a large uint16 array to doubles
Not sure if this is what you are really asking, u = your uint16 array d = double(u);

13 years ago | 3

| accepted

Answered
Without using the roots command, write a function to calculate roots of the quadratic equation
You can use one of the formulations here: <http://en.wikipedia.org/wiki/Quadratic_equation> The quadratic formula is liste...

13 years ago | 0

Answered
Inverse matrix in fortran mexFunction - matlab lapack library
The general crashing problem is caused by the fact that you use complex LAPACK routines when you don't have complex inputs or ou...

13 years ago | 1

| accepted

Answered
cant find mexopts.bat
Type the following at the command line prompt: mex -setup Then press ENTER when it asks you if you want to search for co...

13 years ago | 0

Answered
Can mexw64 files be used on 32 bit matlab?
You cannot run mexw64 code with 32-bit MATLAB. You either need to run them with a 64-bit MATLAB, or recompile the source code in...

13 years ago | 1

| accepted

Answered
How can I covert a c code to a MEX file?
You should read the documentation on creating and compiling mex functions. You need a special interface function (mexFunction). ...

13 years ago | 1

| accepted

Answered
Lapack and Blas on Matlab student version
LAPACK and BLAS dependency (e.g., for matrix multiplication etc) would be the same for the student version. The version of LAPAC...

13 years ago | 0

Answered
How do we know that MATLABs algorithms are working properly?
Well, ultimately how do you know that *any* language (C, Fortran, Python, MATLAB, etc) is compiling/running your code correctly?...

13 years ago | 1

Answered
Is it allowed for a function to have return type of mxArray?
mxArray is defined as an incomplete type in the API header files, hence the prohibition against declaring an mxArray type ... on...

13 years ago | 2

| accepted

Answered
How to call mexCallMATLAB on a function that has inputs of different types?
mxArray *normInputs[2]; mxArray *normOutputs[1]; normInputs[0] = mxCreateDoubleMatrix(2,2,mxREAL); // a double matrix ...

13 years ago | 1

Answered
Matrix as input argument of a matlab function
How are you calling the function? E.g., are you doing this: A = rand(2,2); % sample data B = rand(2,2); % sample data ...

13 years ago | 0

Answered
run mex without argument
If you are not passing in any arguments or passing out any results, it is pretty simple. Just replace the "main" line with the "...

13 years ago | 1

| accepted

Answered
How can I pass a user defined class to a MEX-File?
Pass it in just like any other variable. If it is an old-style class (using @classname directory with multiple files) you ca...

13 years ago | 2

| accepted

Question


Mex API Wish List
I thought I would start a thread to list all of the desired changes, upgrades, and additions to the official mex API. So here go...

13 years ago | 2 answers | 9

2

answers

Submitted


mexPutVariableSharedDataCopy
This C routine puts a shared data copy of a variable into a workspace from a mex routine

13 years ago | 1 download |

0.0 / 5
Thumbnail

Answered
Is there a helper mex function for printing the contents of an mxArray?
E.g., the code for Kaustubha's suggestion: mxArray *myvariable; // code to fill in myvariable here mexCallMATLAB(0,NU...

13 years ago | 1

Answered
Is there an easy way to copy part of an array using mex functions?
There is no mex API function for this directly, but it would be easy to accomplish a simply copy (e.g., a single column) with a ...

13 years ago | 1

Answered
Mex builds in Matlab, but crashes. Breakpoint not reached in Visual Studio debugging
double *outMatrix; // output matrix : plhs[0] = mxCreateNumericArray(3, dims, mxSINGLE_CLASS, mxREAL); ...

13 years ago | 1

| accepted

Answered
How to share memory between C and MATLAB?
Your C application and your MATLAB program are separate processes with their own separate address spaces. When each pulls in the...

13 years ago | 3

Answered
how to run mexFunction
Just transform the one "main" function into a mexFunction. Then that will call all the underlying C++ functions. There is only *...

13 years ago | 1

| accepted

Answered
return value of large arrays from mex differs?
1) Generally no. If you have a memory constraint that is being hit, it will not in and of itself change a floating point calcula...

13 years ago | 1

Question


Allow Question Markup Capability with fewer Reputation Points
Currently it takes 2000 reputation points before one is allowed markup privileges (as part of overall editing privileges). <h...

13 years ago | 4 answers | 5

4

answers

Answered
How can I rename variables containing forbidden characters once they are already imported to workspace?
You can do this with a mex routine. I have already posted code for fixing workspace names for this exact problem. I don't have t...

13 years ago | 1

| accepted

Answered
Sparse and nonspare QR
What happens when you compare the complete result, e.g., [a1 r1] = qr(X); [a2 r2] = qr(full(X)); Then compare a1*r1 w...

13 years ago | 1

Answered
For an n x n matrix, does matlab calculate the eigenvalues in some pattern? If not, is there a way to make it so?
You might try this FEX submission by John D'Errico: <http://www.mathworks.com/matlabcentral/fileexchange/22885-eigenshuffle> ...

13 years ago | 1

| accepted

Answered
How do I best write a direct access binary file in MATLAB that can be read in by a colleague using FORTRAN90 (Visual Fortran on A Windows 7 Platfrorm)?
You usually do not want to use direct access for this situation. Fortran can put record markers on each record when it writes su...

13 years ago | 0

Load more