Réponse apportée
Mixing loadlibrary and mex using same DLL
There is no interference other then that clearing/unloading the library requires clearing the mex file and unloading the library...

plus de 13 ans il y a | 0

Réponse apportée
Unable to load dll using loadlibrary
You will need to install 32 bit MATLAB on your machine. That is the only way to use a 32 bit dll.

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
Converting Matlab-struct to C-struct and access byte data
This is still a hack but you should be able to create one function in a dll that takes a void * and size as an input and returns...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
Error ThunkLoadFailed when loading a dll in a compiled m-File
You need to add the thunk file to the executable produced. Use the -a option to mcc to include the thunk dll in the archive. L...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
Executing the constructor of a handle object with or without semicolon
Your class has a display method which is called to display the variable "a" when the assignment is done without a semicolon. ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
loadlibrary and 64bit shared lib (DLL) on 64bit windows 7
When building the thunk file your header file must be able to compile standalone. Your header file needs mex.h as a prerequisit...

plus de 13 ans il y a | 0

Réponse apportée
Certain Fixed Array Length Syntax Not Supported by LOADLIBRARY
This is a bug in loadlibrary it should soon be on the system as bug report 814593. For now there are two possible workarounds...

presque 14 ans il y a | 1

| A accepté

Réponse apportée
I want the m-file of addheader function that loads the functions defined in the additional header file
There is no function or file addheader. The command should be: loadlibrary EnobioAPI.dll Enobio.h addheader EnobioAPI_glo...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How do I get a C++ structure 'behind' a libpointer?
Given: structs.struct_new.members=struct('u16_Depth', 'uint16', 'u16_Width', 'uint16', 'u16_Height', 'uint16', 'pu16_InData...

presque 14 ans il y a | 0

| A accepté

A résolu


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

presque 14 ans il y a

A résolu


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

presque 14 ans il y a

A résolu


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

presque 14 ans il y a

Réponse apportée
There was an error loading the library
I suggest using <http://www.dependencywalker.com/ Dependency Walker> to profile the loadlibrary call. # Open .../bin/win64/matl...

presque 14 ans il y a | 2

Réponse apportée
How to retrieve a BOOL type value returned from a .dll function
That function should not be returning a |lib.pointer| to MATLAB something went wrong loading the dll. What warnings were report...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Working with cstring datatypes in library function calls
Try using return values from your callib calls and let MATLAB do more of the work there is no need to do most of the data type c...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Big Problem/Bug with new matfile command for partial mat file read/writes - creates massivly bloated files.
For the same reasons that growing an array in memory is a bad idea growing an array in a matfile is not a good programming pract...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
Use Fortran DLL in Matlab which has no header .h file
Best guess for your function is: void __stdcall MYMODEL(double * ModelInput, double * Control, double * TempProfile, doubl...

environ 14 ans il y a | 1

Réponse apportée
Matlab problem with ext. library and large c++ structures
Provided you are properly handling the pointers in this structure the problem is probably caused by structure packing. If there...

environ 14 ans il y a | 1

Réponse apportée
calllib crashes Matlab... no error given
The usual cause of a |calllib| call causing MATLAB to exit with no stack trace is the use of the wrong calling convention. |loa...

environ 14 ans il y a | 1

Réponse apportée
Libpointers and multilevel pointers
calllib(DLL_Alias, 'functionTwo', TAval{1}) % for text1 Should work. Note that in your example you forgot |'functionTwo'...

environ 14 ans il y a | 0

Réponse apportée
Advancing a structure pointer in calllib - shared library
If you are using R2009a or later then you can increment your pointer like so: nextDataBlock=sblptr+1; nextDataBlock=nex...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
Accessing Matlab class data member and libpointer in interfaced C code
You need to use the function |mxGetProperty|. R2011a or later is required for this function to work properly, because of the typ...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
C function returning an mxArray pointer
The rules are the same as for outputs returned via plhs in a mex file. In short: * To return an input a copy must be mad...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
loadlibrary and calllib inside a C mex routine
One possible transitional approach is to turn your c code into a dll/mex file that can be used with both loadlibrary and called ...

plus de 14 ans il y a | 0

Réponse apportée
Mex dynamic memory management issue with std::vector in linked external DLL; Segmentation error
You are probably seeing an incompatibility between the stl library and or compiler options used by your pre-compiled dll and tho...

plus de 14 ans il y a | 2

| A accepté

Réponse apportée
Problem passing large array between matlab and mex function
Your FORTRAN code is missing: #include "fintrf.h" At the beginning of the file. This header is needed when using |-larg...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
DLL handle using libpointer
I believe you may have bumped into <http://www.mathworks.com/support/bugreports/585124 this bug> in R2109b. If you have trouble...

plus de 14 ans il y a | 0

Réponse apportée
Function with input an array of classes.
You have two common mistakes here: # MATLAB class methods require an explicit this input # obj.prop returns a comma separated l...

presque 15 ans il y a | 1

Réponse apportée
Libpointer to enumerated structure class converts all numeric field data types to "double".
|loadlibrary/libstruct| respects the data types defined in the header file. What you are seeing is that the values are automa...

presque 15 ans il y a | 0

Réponse apportée
Subsref question using braces '{}' type and a char subs
Your class needs a NUMEL function. A string is a matrix in MATLAB so classname{'foo'} is the same as calling classname{double('...

presque 15 ans il y a | 1

| A accepté

Charger plus