Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 1

Réponse apportée
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...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 0

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

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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 ...

plus de 10 ans il y a | 0

Réponse apportée
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 ...

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 3

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 1

Réponse apportée
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 ... ...

plus de 10 ans il y a | 2

A résolu


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...

plus de 10 ans il y a

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
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....

plus de 10 ans il y a | 1

Réponse apportée
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 ...

plus de 10 ans il y a | 1

Réponse apportée
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...

plus de 10 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 1

| A accepté

Charger plus