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

plus de 9 ans il y a | 0

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

presque 10 ans il y a | 1

| A accepté

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

presque 10 ans il y a | 1

| A accepté

Réponse apportée
Create prototypes to wrap agains C-Interface DLL - How universal ist the pcwin64.dll created?
The shipping the generated prototype file and compiled thunk file is the recommenced way to distribute code that uses loadlibrar...

presque 10 ans il y a | 0

Réponse apportée
Maximum recursion limit of 500 reached
Is sdpvar a class and does it have a reshape method? If so it is getting called in a way that is causing it to call itself inf...

presque 10 ans il y a | 0

Réponse apportée
My Student Version of MATLAB cant invert 20x20 matrices or "\" 100x100 matrices
Check out this answer http://www.mathworks.com/matlabcentral/answers/138692-matrix-multiply-crashes-matlab-2014a-on-a-amd-a6-145...

presque 10 ans il y a | 1

Réponse apportée
I wrote 2 snippets as below, they both try to find minimum value, but one repetitively uses function handles and the other uses a sub function. It turns out the speed are very different? Why?
Profile your code, think about what the code is doing. Method2 makes one function call to subfun per iteration. Method1 makes...

presque 10 ans il y a | 0

Réponse apportée
Dual Xeon and Matlab R2015b - different behaviour on physical vs virtual machine
MATLAB attempts to detect hyper-threading and may choose not use it. We have found that, for the well optimized math libraries,...

presque 10 ans il y a | 2

Réponse apportée
Error "Matrix index is out of range for deletion" with dynamic variable names but not hardcoded names?
The code blocks are not doing the same thing. Your loop is doing: uniquefields.('L')('removeL') = [] It could be fixe...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
calllib issue , change DMA buffer value
Try: pointer.value(:)=pattern2; Assigning directly to |pointer.value| is the same as |buffer=pattern2| in c which repla...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Why is my MATLAB R2015b installation 56GB in size?
How is the card formatted? What is the output of chkdsk on the card? If the card is formatted fat32 or exFAT (default for SD...

presque 10 ans il y a | 2

| A accepté

Réponse apportée
Can Windows version of Matlab be made to generate crash report without human intervention?
There is no documented way to do this in R2015b. I suggest you make a formal request for this feature to support.

environ 10 ans il y a | 0

| A accepté

Réponse apportée
unloadlibrary still keeps the library loaded!
The problem most is most likely with your library not with MATLAB. When a library is loaded the operating system increases the ...

environ 10 ans il y a | 0

Réponse apportée
"Reshaping" matrix
Simpler and faster solution get rid of the outer loop: xgrid3=NaN(A,D,B); tic for j=1:B xgrid3(:,:,j)=xgrid(P_ind(:...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
How to get find() results as a matrix?
How about: [ind(:,1),ind(:,2)]=find(I);

environ 10 ans il y a | 1

Réponse apportée
What can be done to reduce memory usage in MATLAB R2015b?
Do you use/run code that is really data? For instance does some function generate MATLAB code files dynamically that are later ...

environ 10 ans il y a | 0

Réponse apportée
"depth" of mexMakeArrayPersistent ?
mexMakeArrayPersistent should only be called on the top level cell array or structure. When an mxArray is placed in a cell or f...

environ 10 ans il y a | 1

Réponse apportée
Array of stuctures for repeated use in DLL
This should not make any difference but you might try this code instead. ... structs1 = libstruct('my_struct', tmp); ...

environ 10 ans il y a | 0

Réponse apportée
Does loadlibrary function loads all the functions in one dll?
Yes, by default loadlibrary will load all functions found in the header file used to load or create the prototype file. The fu...

environ 10 ans il y a | 2

| A accepté

Réponse apportée
Why cant i loadlibrary with relative paths
Loadlibrary runs from a freshly created temporary directory so relative paths will not work as include paths. To build an inc...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Order of magnitude (10 times greater) execution time resulting from order of computations in a script file that are otherwise identical.
This appears to be a bug/limitation in the 64 bit JIT in MATLAB versions prior to R2015b. Other versions of MATLAB don't show t...

plus de 10 ans il y a | 2

Réponse apportée
usage of calllib, libpointer, and libstruct with DLL that returns memory
You should be able to do what you are trying to do but have a bug or design flaw. It is best to keep all memory in a single s...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
H5L.iterate exception and behavior of native matlab functions() method
I do not know why H5L.iterate needs function handles with a file defined. I suggest you file an enhancement request to remove t...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
clear persistent variables in sub-functions
I would not use a perstent variable for this. Use a nested function and local variable function temp = MyMainFunction() ...

plus de 10 ans il y a | 1

Réponse apportée
MATLAB's R2015b new JIT experiences a severe degradation in speed in the following example, but the documentation says it was significantly improved. Why would the following simple code run so much slower?
The old (PreR2015b) JIT was highly optimized for a few simple code situations and fell back to the interpreter when it could do ...

plus de 10 ans il y a | 3

| A accepté

Réponse apportée
load a mtalb compiled dll in matlb
You can't, Loading a MATLAB compiled application directly into MATLAB is deliberately prevented. Quote from loadlibrary limi...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
/D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 >>>>>>>when loading dll
extern "C" { Is c++ not c code. Loadlibrary is only compatible with c headers. Most likely this header can be fixed to be...

plus de 10 ans il y a | 0

Réponse apportée
specify compiler used by loadlibrary
The compiler used is the one configured/found with mex -setup. This answer may help if you need to modify your configuration: <...

plus de 10 ans il y a | 0

Réponse apportée
Assistance trying to load 3rd party dll/headers into Matlab
Only use addheader when a function you want does not appear in libfunctions or the prototype file. Find the header containing t...

plus de 10 ans il y a | 0

Réponse apportée
Error using calllib Too many inputs passed to SimpleFunctionThunk.
Calltype of 'cdecl' is not supported on 64 bit systems however it does work for simple functions with a *limited* number of inte...

plus de 10 ans il y a | 0

Charger plus