Respondida
Questions regarding preallocation and much more
The problem here is that the shape of the output and the algorithm determine the number of times the array needs to be reallocat...

más de 10 años hace | 0

Respondida
Returning mxArray* as void* from a C shared library
Passing mxArrays via void pointers is likely to cause problems in your code (memory leaks and crashes). The calllib code has sp...

más de 10 años hace | 0

| aceptada

Respondida
loadlibrary mfilename put in sub folder
The thunk file can be placed anywhere by adding the thunkfilename option with a path to the desired location. The only way to c...

más de 10 años hace | 1

| aceptada

Respondida
Share Library works but is unstable
You are going to have to debug this yourself. Some suggestions: # Don't unload the library. Unloading a c or c++ library do...

más de 10 años hace | 0

Respondida
Using c-files in Matlab
If these c files are already a library of functions and you wish to use more then one of them from MATLAB then make a shared lib...

más de 10 años hace | 0

| aceptada

Respondida
Is it possible to change the 'ClockPrecision' setting of MATLAB's Profiler?
The ClockPrecision is based on the timer used, change the profile timer source for a different precision. If you have access to...

más de 10 años hace | 1

Respondida
How to Load Multiple dll files that have one header
You need to call loadlibrary three times. It will be faster if you create a prototype file the first time or even do it once an...

más de 10 años hace | 0

| aceptada

Respondida
memory leak from mex file in R2012a?
Most likely the problem is in the specific mex file. There are no systematic leaks with mex files in any recent version of MATL...

más de 10 años hace | 0

Respondida
Matlab efficiency - Pass by reference
Does R.Struct1 contain objects (especially handle objects) or data that could be in other objects? Of particular concern is any...

más de 10 años hace | 0

Respondida
Safe memory management when interfacing code via MEX
Locking the mex file is only needed to preserve static data. Any memory allocated using malloc or new will persist until delete...

más de 10 años hace | 0

| aceptada

Respondida
Memory leak when calling DOS command in a loop
Best guess is that your executable is not exiting cleanly or at all. Check task manager for a large number of some process. Mo...

más de 10 años hace | 0

Respondida
loadlibrary issue with dll
These lines of code : typedef unsigned __int8 u08; Are making use of a Microsoft extension to the c language ( |__int8...

más de 10 años hace | 1

| aceptada

Respondida
loadlibrary issue with dll
I do believe the problem is a missing header. The |addheader| loadlibrary option is NOT the solution by itself. Start with a c...

más de 10 años hace | 0

Respondida
Do Matlab structures leak memory?
This is not a leak and has nothing to do with Java heap. This code is not using the Java heap. The problem is that you are...

más de 10 años hace | 0

Respondida
mex code did not give improvements as compraed to matlab code
I will hazard a guess that your performance problem is the allocation of data inside your for loops. Allocating memory is slow ...

más de 10 años hace | 0

Respondida
How Do I use Mexcallmatlab to Call a User-defined function?
This will not work. MATLAB and mexCallMatlab are not thread safe, there is no way to call a MATLAB function from an OpenMP for ...

más de 10 años hace | 0

Respondida
mpi affecting matlab execution speed
Could the problem be a power savings setting? Many machines are now configured to run at a lower clock rate when not heavily l...

más de 10 años hace | 3

| aceptada

Respondida
Debug-mode compilation in Windows uses release-mode C and C++ standard libraries
Mex files have always been built and linked against release versions of the libraries to avoid conflicts caused by mixing releas...

más de 10 años hace | 1

Respondida
Given a named function, how can I call this function, and not the subfunction of the same name?
There is a much simpler solution to this: function fh=test fh=str2func('@(x) help(x)'); fh('help') end ... ...

más de 10 años hace | 2

Resuelto


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

más de 10 años hace

Respondida
64 Bit version of Matlab 2015a a lot slower than 32bit version
Two things to look into: Independently (of MATLAB) check the machines performance. And also post bench results from the same...

más de 10 años hace | 0

Respondida
Why does profiler include idle time?
This is a bug/feature in recent versions of the profiler through R2015a. On Mac/Linux the profiler times with processor time b...

más de 10 años hace | 0

| aceptada

Respondida
LoadLibrary, enums, and character literals
This is a bug/limitation in the perl script that parses the header file. Because the perl script works from a pre-procesed hea...

más de 10 años hace | 1

| aceptada

Respondida
Can I use Matlab Profiler on a compiled DLL
The profiler is not available in compiled code. You will need to make a driver program in MATLAB that can call your code or use...

más de 10 años hace | 0

Respondida
Toc returns loop time instead of total script time
Clear all and clc will not clear tic time. There must be another call to tic. For this reason I recommend always using the...

más de 10 años hace | 0

Respondida
Has Matlab 2013b and newer fixed the memory leak issues in pause and delete?
You could say they were fixed but that would not explain the whole situation. The pause "leak" was a message queuing and gr...

casi 11 años hace | 1

| aceptada

Respondida
matPutVariable() -> matrix::serialize::WrongSize at memory location
First-chance exceptions are frequently normal. If you were to debug MATLAB you would see many thousand first chance exceptions....

casi 11 años hace | 1

Respondida
Is there anyway to check what functions are defined in a mex file?
By definition A standard mex file only only has one function available to MATLAB named the same as the mex file and implemented ...

casi 11 años hace | 1

Respondida
Cannot debug mex file with Microsoft Visual C++ 2013 Professional
I see two possible issues. The first is that Visual Studio is attached to MATLAB as 'Managed' note the select button in your f...

casi 11 años hace | 2

| aceptada

Respondida
matPutVariable fails in matcreate.cpp for matlab2014b on windows 8
First thing to do is check that your matcreate.exe is using zlib1.dll supplied with MATLAB and not one from another package. Yo...

casi 11 años hace | 1

| aceptada

Cargar más