Answered
Getting data from asychronous mex function.
I believe that calling back into MATLAB from a windows hook with mexCallMatlab or mexEvalString works fine, or has in past versi...

7 years ago | 0

Answered
How is execution time (cpu time) calculated for multi-core cpu?
The matlab profiler lets you select the timing source if you run it manually using the -timer option: profile on -timer cpu...

7 years ago | 0

Answered
What do you think of "Did you mean clearvars -except".....?
The suggestion is interesting but not possible to implement. "did you mean?" is implemented with a try-catch block but your cl...

7 years ago | 0

| accepted

Answered
How to declare a pointer to a pointer array?
MATLAB can't create and manage an array of pointers to data buffers for external use. My suggestion is to create a mex file or ...

7 years ago | 1

Answered
how to save number of function calls from profile
Use the results returned by profile('info'). profile on; magic(3) ; profile off; ifo=profile('info'); ifo.FunctionTab...

7 years ago | 0

Answered
Why does running a MEX file on MacOS crash MATLAB when mexerrmsgtxt is used?
What FORTRAN compiler and version are you using? The only supported compiler I see is Intel FORTRAN Composer XE (2013) <http://...

7 years ago | 0

Answered
calllib() and parallelization using OpenMP
I can't tell you why this is not working but can give you someplace to start. Attempting to use OpenMP in a function called by...

7 years ago | 0

Answered
Where are the compiled THUNK files located and how to re-use them?
If you specify the mfilename option to loadlibrary then the thunk file will be created in the same directory as the prototype fi...

7 years ago | 1

Answered
How to import a DLL/shared library into MATLAB?
My first thought is that the absence of a header file probably means that this dll should not be used with loadlibrary. If the ...

7 years ago | 0

Answered
Error while loading library
Something quite odd is going on, This error is caused by a timeout waiting for the prototype file to be visible to MATLAB after...

8 years ago | 0

Answered
How does one have arrays in a Matlab share the same memory
A libpointer can be (mis)used to do this but I am not sure it will help in the long run due to the overall performance of and co...

8 years ago | 1

Answered
Returning error number as string when only Int32Ptr is accepted in Matlab
Remember that MATLAB creates everything(*) on the left of an equals sign and don't bother initializing xMotor and errorNumber th...

8 years ago | 0

Answered
Efficiently Swapping Columns in a Matrix
Does your data need to be in a matrix? Swaping two elements of a cell array will be much faster for large element sizes and wil...

8 years ago | 1

Answered
End line taking huge amount of time in profiler
Without seeing the full function all I can do is guess. Typically time shows up in end statements for workspace cleanup when ex...

8 years ago | 0

Answered
Is it possible to disable crash dump files?
There may be a way for you to disable the crash dump files for your tasks, I suggest contacting support directly. The methods o...

8 years ago | 0

Answered
Error using loadlibrary line 440
The header file as written is not compatible with C code only c++. On first inspection It looks like the dll might be callable...

8 years ago | 0

Answered
Some Matlab versions crash when using listener
MATLAB is not crashing just taking a very long time to complete. Try it with smaller values of N and look how fast the time inc...

8 years ago | 1

| accepted

Answered
rmdir frequently fails with the 'MATLAB:RMDIR:SomeDirectoriesNotRemoved' error
This is often caused by interaction with your virus scanner that happens to still be scanning / looking into files that may alre...

8 years ago | 4

| accepted

Answered
Maximum possible array leak in standalone application
The application version of matlab does a few things to help increase the available memory and largest block size. # Link the ...

8 years ago | 0

Answered
Beginnning of file considered as code section
My first thought is don't put that code at the top of each script. Especially |clear all| it slows down the execution of the co...

8 years ago | 0

Answered
Using calllib with a function that uses std::vector in its prototype
What you are trying won't work. loadlibrary only supports calling functions that are callable from C and header files that ca...

8 years ago | 1

| accepted

Answered
Destruction of Objects with Cyclic References: MATLAB automated procedure is much too slow, how to turn it off (and reimplement a solution fitted to my needs by writing proper destructor methods)?
There is no way to toggle off the detection algorithms, doing so would cause enough objects to leak that MATLAB would probably b...

8 years ago | 0

Answered
Using Matlab Generated Enumerators of External C Library
There is no straight forward way of doing this other then to write your own converter in C. typedef enum Enum1 {en1=1,en2,e...

8 years ago | 0

Answered
Clearing variables does not clear RAM
Some questions and thoughts: # Task manager is not a very good way to track memory use by an application. I suggest looking ...

8 years ago | 0

Answered
.dll files are not running in matlab.
It looks like those dlls might be old mex files. Mex files used the .dll extension in older 32 bit versions of MATLAB on Window...

8 years ago | 0

Answered
Visual studio unable to load symbol file for libmwsimulink.dll
Failing to load the symbols for simulink is normal we do not ship symbols for MathWorks dlls. Are you sure that the command fai...

8 years ago | 0

Answered
Multiple include paths in mex
You need to use two different variables or a cell array of paths: path1 = ['-I' fullfile(pwd,'tempInclude1')]; path2 = [...

8 years ago | 3

| accepted

Answered
Why does my one calculation take so much longer than the other when its the same function?
When |end| at the end of a function shows a significant amount time the cause is most often the overhead involved in cleaning up...

8 years ago | 0

Answered
passing arguments in classdef
This "feature" is undocumented behavior and I would consider it a bug subject to change in the future. All recent versions of ...

8 years ago | 1

| accepted

Answered
Calling C/C++ libraries (with associated cstring pointers) in MATLAB
You can only call functions that appear int the output of |libfunctions -full| with arguments that can be converted to those lis...

8 years ago | 1

| accepted

Load more