답변 있음
How bad is the performance of run time introspection?
Since R2015b functions that introspect are just slower, they do not generally disrupt any other optimizations. I would probably...

7년 초과 전 | 1

| 수락됨

답변 있음
Problem with number precision in version 2017a
If all your data is in the range you specified with only 2 decimal digits of precision then try: dlmwrite(file_name,A, 'de...

7년 초과 전 | 0

답변 있음
How can I join chars to a string vector?
If you really have a char array (85x19 is not a vector... these are not all that common now) and are using a recent version of M...

7년 초과 전 | 0

답변 있음
problem explicitly calling subsasgn with buitlin method
You bumped into an area of loosely defined behavior. In general you can't index into the results of a function call in MATLAB...

7년 초과 전 | 1

답변 있음
Error using loadlibrary when trying to load dll
Those are old mex files probably for a version of MATLAB before R2007a. If you have an old 32 bit version of MATLAB you may be...

7년 초과 전 | 0

답변 있음
Speed of matrix storage
Analyzing a snippet of code out of context has little value and often leads to improper conclusions. In this code creating a ne...

7년 초과 전 | 1

답변 있음
Can I use @subClass folder inside @superClass folders to create a class hierarchy?
As pointed out by others nested classes won't work. I would use a package: myroot/@baseclass % or just myroot/baseclass.m ...

7년 초과 전 | 0

답변 있음
Why is my code echoing in the command window after the first line with curly braces?
Remove your echo off commands and enter " |dbstop in echo|" then run your code or type a line that causes echo. I expect there...

7년 초과 전 | 1

| 수락됨

답변 있음
Mex file compiles in Visual Studio but crashes MATLAB, getting error in debug.
First suggestion build with the mex command instead of directly with visual studio. Make sure that works. Then check your comp...

7년 초과 전 | 0

| 수락됨

답변 있음
Using (popular) mexed c++ kdtree from fileexchange leads to Matlab system crashes.
After a quick look at the code I will guess it is not compatible with 64 bit windows. If the objects are allocated at memory ad...

7년 초과 전 | 2

| 수락됨

답변 있음
Why is partial loading of matfile "inefficient" for -v7, but still faster?
V7 matfiles are faster in general and can be much faster if many small structures are saved. When working with large files cont...

7년 초과 전 | 1

| 수락됨

답변 있음
how to read strings with multiple null (\0) terminators when using calllib functions
Modify the prototype m file to declare the buffer variable as int8Ptr (or uint8Ptr) instead of cstring. Then pass an int8 buffe...

7년 초과 전 | 1

| 수락됨

답변 있음
MATLAB takes a long time to run the same code on my laptop compared to my desktop.
I think this may be expected Intel "U" processors are not fast they are power efficient. * Both processors are 2 cores 4 t...

7년 초과 전 | 1

답변 있음
error 2059 in loadlibrary
Loadlibrary compiles all thunk files as c not c++. The header file used must be c compatible, wrap all |extern "C"| statements ...

7년 초과 전 | 2

| 수락됨

답변 있음
Matlab crashes when the external function in DLL is called (x64 code)
Sounds like a job for the debugger. Without specifics we can't be of much help. The 64bit abi is sometimes called fastcall an...

7년 초과 전 | 0

답변 있음
Fastest way for variable row indexing
I made two changes to your code on my machine it is a bit faster: # Avoid using repmat and concatination instead use direct ...

7년 초과 전 | 0

답변 있음
Matlab crashing on loading library
The crash is in the com control for the Handyscope (oscilloscope\HS3.dll). I suggest contacting support for it or starting by s...

7년 초과 전 | 0

답변 있음
Matlab 2016 backward compatibility issue with loadlibrary
Your header file is c++ code and thunk files are c there is no way this could have worked in 64 bit MATLAB. Was your previous M...

7년 초과 전 | 0

| 수락됨

답변 있음
Matlab R2016 runs much slower calls to .m files than R2013
This answer is a bit late but the problem here is breaking code up into scripts instead of functions. Using R2016b you can cr...

7년 초과 전 | 1

답변 있음
How to create a subclass to built-in class?
You did it correctly in general but the ss class should probably be marked as |Sealed|, I recommend not subclassing it. Only pr...

거의 8년 전 | 0

답변 있음
How to create a pointer on a struct?
MATLAB does not know what a |c_struct| is without loading the library. Load the library first using the code from the example: ...

거의 8년 전 | 0

답변 있음
Preallocating memory for a cell array of unknown size & removing the empty rows in cells array
Your question bring a few points to mind before even answering it. # Preallocating cell arrays and structures is not as helpf...

거의 8년 전 | 1

답변 있음
How to create an empty array of structs?
Actualy the simplest and fastest solution to this problem is to not attempt to create an empty struct. Run the loop backwards t...

거의 8년 전 | 4

답변 있음
Strange problem while using Matlab structures
lasdata in the file exchange is a handle class so plotLevelLiDARdata is not a structure, it is a handle class type object. With...

거의 8년 전 | 1

답변 있음
Duplicating an mxArray without first storing it as a plhs?
You don't need to put the value into plhs but you do need to put it somewhere. You must need the array for some reason later in...

거의 8년 전 | 1

| 수락됨

답변 있음
Bug in subsref overloading
I don't think there is anything new here or any new bugs here. There was a design flaw with how numel was used to implement the...

거의 8년 전 | 3

답변 있음
multipying character in array number
Did you really want a character array? >> syms a >> b=a.*[1 -1 1 -1 -1] b = [ a, -a, a, -a, -a] To get a charact...

대략 8년 전 | 0

답변 있음
How to write/edit prototype file when .h and .dll files dont work correctly?
I would start by trying to fix the header file to get a better prototype file to start with. This header appears to be only com...

대략 8년 전 | 0

답변 있음
linking a dll with loadlibrary "specified module could not be found" error
That error is frequently the result of some other dll being missing from your system or otherwise failing to load. I recommend ...

대략 8년 전 | 0

답변 있음
In mex file, I can't overwrite scalar value through the pointer in matlab2016a, although I can overwrite the scalar value through the pointer in matlab2013a and I can also overwrite the array through the pointer in matlab2016a.
Scalar values no longer (as of R2015b) create mxarrays by default. They are created as needed when a mex or buit-in function is...

대략 8년 전 | 0

| 수락됨

더 보기