Réponse apportée
unexpected value for nargout when returning a class/struct
In general you cannot index into the output of a function call in MATLAB. You have found an under documented feature of dot i...

plus de 11 ans il y a | 1

Réponse apportée
Weird warning when using loadlibrary - said it created a library and an object??
Creating those files is harmless, and a side effect of building the thunk file, but unneeded. It sounds to me like there is a m...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
what data type do i need to calllib with pointer argument char*
You are over thinking this let MATLAB do the work no libpointers are needed: [status, resultString]=calllib(libalias,'PI_En...

plus de 11 ans il y a | 0

Réponse apportée
Cell Array of Function Handles Leaks Memory
This function generates function handles that run faster in much less time and uses little memory overhead. I will also assert ...

plus de 11 ans il y a | 1

Réponse apportée
Using C Header files with loadlibrary
You are making a common mistake interpreting the functionality of the addheader function. It will not help in this situation, t...

plus de 11 ans il y a | 0

Réponse apportée
How to pass a three-level pointer (void***) to a function in a shared library?
Three level pointers are not supported if you do not need to manipulate the handles from matlab or need only minor access you ma...

presque 12 ans il y a | 0

Réponse apportée
What extra data is stored by an anonymous function?
I will start my answer with a quote from the documentation of functions: The functions function is used for internal pur...

presque 12 ans il y a | 1

| A accepté

Réponse apportée
Problem with loadlibrary and commercial dll
Best guess is that this header is designed to produce a c (or other language) callable dll but the header itself is not c compil...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
Import FMU via loadlibrary
Function pointers are not supported by loadlibrary or calllib there is no way to create one in MATLAB that can be passed to and ...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
Import FMU via loadlibrary
More information (edit your question) on what you have tried and any errors you are getting would be helpful. I will make a wil...

presque 12 ans il y a | 0

Réponse apportée
Odd behavior when using character sequence as an array index
This is a known bug: <http://www.mathworks.com/support/bugreports/405376 Bug 405376> character indexing is a bit dangerous be...

environ 12 ans il y a | 2

Réponse apportée
Loadlibrary unable to find 'prototypes.pl'
|prototypes.pl| should be located in the directory |fullfile(matlabroot,'/toolbox/matlab/general/private')| because it is in a p...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
How can I use the MEX function signature in a DLL library called using loadlibrary and calllib?
Calling a function with a mex signature with calllib is supported. The example yprime.c in extern\examples\shrlib is used demon...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
How to improve memory administration inside Matlab?
The only other way to improve the situation is to adjust the amount of virtual address space XP (or other 32 bit windows OS) wil...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
Using a shared library without an installed compiler?
Load the library on your machine using the |mfilename| option to loadlibrary then supply the generated prototype file and thunk ...

environ 12 ans il y a | 2

| A accepté

Réponse apportée
Shadowing built-in functions
As others have pointed out here avoiding shadowing is impossible particularly because I have not yet met a programmer who is an ...

environ 12 ans il y a | 2

Réponse apportée
How to efficiently create an array of libpointers?
The libpointer code itself is fine but if you did not preallocate rapidBlockBuffer then this code is very slow (order n^2 instea...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
libstruct does not fill embedded arrays
It only displays as [] for a null structure. If a libstruct object is created with no initial values then a null (unallocated)...

plus de 12 ans il y a | 0

Réponse apportée
Read Unformatted SD Card in Matlab
This probably can't be done entirely within MATLAB. I suggest turning your C# code into a library that can be accessed using th...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
loadlibrary produces invalid thunk code
Although legal c this header code is certainly bad form and I would not recommend it. Unfortunately loadlibarary only properly ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
loadlibrary does not understand Microsoft-specific pointer modifiers
Does your header file include windows.h? Loadlibrary requires standalone header files. All necessary prerequisite headers must...

plus de 12 ans il y a | 0

Réponse apportée
How can I use a DLL with Matlab when I cannot install a C compiler?
If you use the "mfilename" option to loadlibrary on the first computer to produce a prototype file (and thunk file if using 64 b...

plus de 12 ans il y a | 1

Réponse apportée
Problem with set field by number
If you are trying to grow an existing structure then you will need to reshape the structure when done. If you create the struct...

plus de 12 ans il y a | 0

Réponse apportée
How can I create a pointer to a structure with more than 3 elements?
dpb is correct the code should be something like: % call loadlibrary to load mylib sm = struct('Major', 0, 'Minor', 0, '...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How do I manipulate multilayer pointers in calllib calls, what is the proper syntax?
MATLAB automatically does the pointer conversions for you there is no need to add a star. You did not post the symptoms or ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to force MATLAB to use single precision ONLY?
You may be able to simplify your coding by subclassing single and using that class. classdef forcedSingle < single meth...

plus de 12 ans il y a | 1

Réponse apportée
problem about using calllib why I can't show the value on the window of console
Calling cout from a mex file or dll does not work on all versions of MATLAB and operating systems. The best solution is to use ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
loadlibrary problem with DLL file
Most likely there is #include statement missing from the library header file. "windows.h" is a common offender but it could be ...

plus de 12 ans il y a | 0

Réponse apportée
Same code, Different results on 3 computers - only simple multiplications and additions involved
The performance difference is due to an <http://blogs.mathworks.com/steve/2011/05/16/automatic-array-growth-gets-a-lot-faster-in...

plus de 12 ans il y a | 1

Réponse apportée
PCode obfuscation cracked - alternatives?
What leads you to the conclusion that pcoded files can easily be de-obfuscated? I am aware of the numerous ways that informatio...

plus de 12 ans il y a | 3

Charger plus