Respondida
MATLAB has encountered an internal problem and needs to close
This usually indicates a coding error in the mex routine itself. E.g., not checking for valid number of inputs or class of input...

alrededor de 12 años hace | 1

Respondida
Could you plz help me guys.
Can you examine the code to see if it looks like a function or a variable? Maybe it is a variable that was supposed to be define...

alrededor de 12 años hace | 1

Respondida
What does @ on a dir of *.m files mean?
@dirname means that it is an old-style class definition, the class name being dirname. All of the functions (methods) that the c...

alrededor de 12 años hace | 3

Respondida
How to convert .c/.MEX file to .m files ?
The simplest seems to be the C/MATLAB MEX option, since that suggests you can simply take the exported files, compile them, and ...

alrededor de 12 años hace | 1

Respondida
how to calculate power of fraction without getting complex double ?
Not sure what the overall calculation is doing, but if you will allow negative inputs, then maybe this formulation is what you c...

alrededor de 12 años hace | 1

| aceptada

Respondida
Using a .mexw64 function on a Mac.
No. The mexw64 file can only be used by a 64-bit MATLAB version running under Windows. There is no way to modify it (copying, pa...

alrededor de 12 años hace | 1

| aceptada

Respondida
How do I define log function for arguments of type int16 ?
Turn them into double. E.g., log(double(Spre)./double(Spost))

alrededor de 12 años hace | 2

| aceptada

Respondida
Edit mex configuration programmatically
Can you go into the mexopts directory, copy all of the setup files for the compiler you are using into new files with slightly d...

alrededor de 12 años hace | 0

Respondida
calling mex function multiple times
Try changing this line: MWSIZE, EXTERNAL :: MXGETM, MXGETN to this: MWPOINTER, EXTERNAL :: MXGETM, MXGETN This...

alrededor de 12 años hace | 1

Respondida
Matlab slow when too many files in directory
Every time you change the current directory, MATLAB has to examine each and every file in the new directory to see if there are ...

alrededor de 12 años hace | 1

Respondida
How do I change a file from .mexw64 to .m?
A .mexw64 file is compiled machine code for a Windows 64-bit setup. So it must be used by a 64-bit MATLAB version running under ...

alrededor de 12 años hace | 1

| aceptada

Respondida
matlab command for complex exponential function.
The exp function works for complex inputs: >> z = 1 + 2i z = 1.0000 + 2.0000i >> exp(z) ans = -1.1312 +...

alrededor de 12 años hace | 1

| aceptada

Respondida
The pause and return commands of fortran 90 to matlab
The PAUSE statement does just what the name implies, pauses execution with a message until user does something (e.g., presses En...

alrededor de 12 años hace | 2

| aceptada

Respondida
(simple) problem for function that doesn't return value
How are you calling the function? The names of the variables in the calling routine have no connection to the names in the funct...

alrededor de 12 años hace | 3

Respondida
homogeneous distribution of particles over the surface of a sphere
Consider circular horizontal slices through the sphere (latitude slices). At the equator, the circle has a certain radius(the ra...

alrededor de 12 años hace | 1

| aceptada

Respondida
mex file and gpib link
To examine what the class name is for a variable in a mex routine you can use mxGetClassName: http://www.mathworks.com/help/m...

alrededor de 12 años hace | 2

Respondida
Fortran to Matlab converting the "where" statement
no_converge= zeros(size(A)); no_converge( abs(A-B) > e ) = 1; or no_converge= double( abs(A-B) > e ); or if you ...

alrededor de 12 años hace | 1

| aceptada

Respondida
Using a loop to create multiple variables
Are you simply trying to do something like this: D = A(FirstIndex:CycleSkip:FirstIndex+500,:); Then you can pick off X a...

alrededor de 12 años hace | 2

Respondida
How does one return allocated memory from a Fortran Mex function?
Fundamental Principle: You cannot mix native Fortran (or C or C++) memory within an mxArray. To do so will always result in a cr...

alrededor de 12 años hace | 3

| aceptada

Respondida
How to convert a 24 bit, two’s complement value into a signed integer?
s = 2's complement 24-bit string to convert b = [s([1 1 1 1 1 1 1 1]) s]; % sign extension k = typecast(uint32(bin2dec(b...

alrededor de 12 años hace | 2

| aceptada

Respondida
Problem with mxGetScalar in mex function cuda
If MATLAB prints out the value of 72 for nV just prior to the mex call, then that is what it is inside your mex function. So my ...

alrededor de 12 años hace | 1

| aceptada

Respondida
Iterate through custom bus datatype fields CMex
If you have a struct in your mex routine (call it st) and need to get at the .Elements(1).DataType field element, you will need ...

alrededor de 12 años hace | 1

Respondida
A PUZZLING QUESTION: Does Matlab's Mex file support external inputs and outputs?
Yes, you can use native Fortran file I/O in mex routines. Just write the code as you normally would. The main restriction is in ...

alrededor de 12 años hace | 2

Respondida
Problem with mxGetScalar in mex function cuda
Can you verify the value of DICTIONARY.nV just prior to making the mex call? E.g., display(DICTIONARY.nV); v = makeOpera...

alrededor de 12 años hace | 1

Respondida
How to improve efficiency of two port matrix calculations?
If your main stumbling block is doing 3D page-based matrix multiplication, you can try 3rd party submissions from the FEX. E.g.,...

alrededor de 12 años hace | 1

| aceptada

Respondida
what segment of memory does the matlab primary work space and function work space occupies?
Not sure we understand your question completely, or why you are asking it. The memory for variable data typically comes from the...

alrededor de 12 años hace | 1

| aceptada

Respondida
data structure for a matrix (2 dimensional) whose elements are a vector
For memory efficiency, you can use a 3D k-by-m-by-n array A. E.g., A(1:k,1,1) = 1st k-vector A(1:k,2,1) = 2nd k-vector ...

alrededor de 12 años hace | 1

| aceptada

Respondida
Come come. Mex File error running.
You've got several type mismatches. E.g., out2 in mexFunction is a pointer to a double (i.e., REAL*8) since you use mxCreateD...

alrededor de 12 años hace | 2

Respondida
how to optimize a diag matrix with sparse
If you mean how to create the equivalent sparse matrix to your full matrix shown, try using the spdiags function instead of diag...

alrededor de 12 años hace | 1

Respondida
Same Same But Different? mxGetPr and mxGetData...
mxGetData returns a (void *) type to the address of the data memory block. It can be used with a cast to get a pointer to whatev...

alrededor de 12 años hace | 5

| aceptada

Cargar más