Respondida
how to call a C# function, foo(out byte [])? -- help passing a byte pointer
Have you tried changing the header signature to something more friendly to MATLAB, but have the same basic I/O? E.g., b...

alrededor de 12 años hace | 2

Respondida
How can I perform matrix operation efficiently?
This is vectorized, but it creates potentially large intermediate arrays, so I don't know if it will be any faster than your sim...

alrededor de 12 años hace | 2

Respondida
Calculate max(diff(A)) fast and memory efficient.
You could resort to a mex routine. E.g., here is bare bones code (no argument checking) for double input: #include "mex...

alrededor de 12 años hace | 2

Respondida
Remove NaN from a matrix
If you have the appropriate toolbox, you can use the function: nanmean

alrededor de 12 años hace | 2

Respondida
Mex files crashes when run
The main problem is that you, the programmer, need to create the output mxArray plhs(1). When you run the mex routine the only m...

alrededor de 12 años hace | 2

| aceptada

Respondida
what is it mex setup?
The mex setup process will let MATLAB configure the proper compiler files for mexing your code. Do this at the MATLAB command li...

alrededor de 12 años hace | 3

Respondida
Problem in using bsxfun
For a multi-dimensional paged based linear solver, bsxfun is not the correct approach. You will need to either write loops, or u...

alrededor de 12 años hace | 2

Respondida
how i can convert binary 128 bit to decimal??
Double precision numbers only have a 52-bit mantissa (+1 hidden leading bit), hence the error. A uint64 has 64 bits, and that is...

alrededor de 12 años hace | 3

| aceptada

Respondida
What version of Fortran does both Windows 7 and Matlab 2011b support?
You can start with this page, which gives links to the various versions: http://www.mathworks.com/support/sysreq/previous_rel...

alrededor de 12 años hace | 1

Respondida
using calllib for 32 bit native module built in Microsoft Visual C++ 2008.
You can't mix 32-bit s/w and 64-bit s/w. You will not be able to call functions from a 32-bit dll from within a 64-bit applicati...

alrededor de 12 años hace | 1

| aceptada

Respondida
Copying 2-D C++ array into mxArrays
If the array elements are in column order in the C++ file, then a simple copy will suffice. E.g., #include "mex.h" void ...

alrededor de 12 años hace | 1

| aceptada

Respondida
how can i do about error 206?
The source code file timestwo.F either needs to be in the current directory, or you need to give the explicit path to the file. ...

alrededor de 12 años hace | 1

| aceptada

Respondida
Making each element of a row vector equal to zero
You don't need a for loop. You can just do this: row_vector(:) = 0; % Set all elements to 0, keep original variable type th...

alrededor de 12 años hace | 1

Respondida
UNIX to seconds from beginning of the day
One way: ds = your_datestring_stuff; dn = datenum(ds); % Turned into datenum format s = (dn - floor(dn)) * 86400; % S...

alrededor de 12 años hace | 1

| aceptada

Respondida
MEX compile type error
I don't know how this could have ever worked. In the first place, the arguments to sprintf are wrong. E.g. the 1st argument need...

alrededor de 12 años hace | 2

| aceptada

Respondida
Incompatible type with mxCreateNumericArray
It is complaining because you declared outDims as an int array (which when used as an argument gets converted to const int *), b...

más de 12 años hace | 3

| aceptada

Respondida
How to use Matlab "data=load(filename)" in a Mex file
Basically, set up the appropriate mxArray variables then use mexCallMATLAB. E.g., mxArray *filename, *data; char cfilena...

más de 12 años hace | 3

| aceptada

Respondida
a problem with MEX - 'Link of '___.c' failed.
Please post your C code ... it appears you may be missing the gateway function mexFunction in your code.

más de 12 años hace | 0

| aceptada

Respondida
Vectors need to be same length
time = fps*(0:(length(fz)-1))'

más de 12 años hace | 0

| aceptada

Respondida
Can I have two versions of MatLab on my machine
In general, YES, you can have multiple versions of MATLAB installed on the same machine. You do not have to uninstall one before...

más de 12 años hace | 7

| aceptada

Respondida
How to execute .c file on matlab 2012?
The fact that you can't open the output file possibly means you do not have write privileges into the \extern\examples\mex direc...

más de 12 años hace | 0

Respondida
matlab syntax (parentheses and functions)
Your function signature should have whole variable names, not subscripted names. That is, you might be passing in PQMatx(k,1) an...

más de 12 años hace | 0

| aceptada

Respondida
MEX file (FORTRAN) calling a LAPACK routine crashed
Fortran does *not* automatically convert arguments to the correct type like C/C++ does. You need to get the arguments the same a...

más de 12 años hace | 0

| aceptada

Respondida
Cell Array of Function Handles Leaks Memory
I suspect this is a problem with the MATLAB function parser and acceleration techniques used behind the scenes. Unfortunately, I...

más de 12 años hace | 1

| aceptada

Respondida
is it possible to call MATLAB code in a FORTRAN ?
For mex functions there is a routine called mexCallMATLAB that allows you to call a MATLAB function from your Fortran or C/C++ c...

más de 12 años hace | 0

Respondida
How do I use ‘sgeqpf’ function in LAPACK inside MATLAB?
You could try this FEX package by Tim Toolan: http://www.mathworks.com/matlabcentral/fileexchange/16777-lapack It provides...

más de 12 años hace | 0

| aceptada

Respondida
Handling syms in Mex Files
Using this variable: >> syms a b c >> x = [a b c] x = [ a, b, c] And this mex file (symdetails.c): #inclu...

más de 12 años hace | 1

Respondida
Why does Fortran write(6,...) not show in MATLAB window
You can look near the end of this thread for a technique that might work for you if you do not need the output interactively wit...

más de 12 años hace | 2

| aceptada

Respondida
mxCreateString usage when calling matlab
MATLAB strings are stored internally as 2 bytes per character, not 1 byte per character. For regular ASCII text, that means that...

más de 12 años hace | 0

| aceptada

Respondida
how to integrate f(x)= x/(8+6x^2)^2 in matlab
See this thread: http://www.mathworks.com/matlabcentral/answers/123266-how-to-find-the-integral-of-f-x-1-x-4-on-matlab And...

más de 12 años hace | 1

Cargar más