Risposto
A constructor call to superclass appears after a return
Call <https://www.mathworks.com/help/matlab/ref/error.html error> instead of disp and return. The constructor must return a va...

oltre 6 anni fa | 0

| accettato

Risposto
No performance improvement with preallocating for object arrays
Your pre-allocation code is doing the work twice. Try profiling your code. |ObjectArray( numberOfObjects ) = classObject| wil...

oltre 6 anni fa | 0

Risposto
Matlab: Retrieve data from libstruct field where actual data exceeds struct layout
The placement of a small array at the end of a structure and indexing into it is a common practice that is not supported by the ...

oltre 6 anni fa | 0

Risposto
Design choice for iterating over a cell array
There was not much choice in how the language could do it. |For| was initially defined to loop over the columns of the input ma...

oltre 6 anni fa | 4

| accettato

Risposto
Matlab running slower on Linux than Windows 7
You appear to be running different versions of MATLAB on the two machines (the list of reference computers is different in you b...

oltre 6 anni fa | 1

| accettato

Risposto
Can the matlab profiler be used in code employing classes with overleaded methods?
The profiler should work just fine in this situation. However without a bit more information or an example All we can do is gue...

quasi 7 anni fa | 0

| accettato

Risposto
Why did the -nodesktop startup option disappeared from the documentation?
Short answer: -nodesktop has never been officially supported on Windows. This blog may answer any further questions: <https:...

quasi 7 anni fa | 0

Risposto
Method chaining unexpected behaviour?
In general indexing into the output of a function call, what you call method chaining is not supported in MATLAB. Property acc...

quasi 7 anni fa | 1

| accettato

Risposto
Loading C++ shared library DLL into matlab
Loadlibrary works for C or C++ libraries that have C interfaces. It appears to me (from a quick look at the header file) that t...

quasi 7 anni fa | 0

Risposto
Precision lost when change numbers to string
Similar to how you were doing it: ST=join("Hi " + num2str(A',"%1.12e"), newline ) ST = "Hi 2.101000000000e-06 H...

quasi 7 anni fa | 1

| accettato

Risposto
updating P-code
No there is not. In general this should not be necessary unless you have a very old p-code file. The last time the format was ...

quasi 7 anni fa | 0

| accettato

Risposto
What happens on Ctrl + C?
Two things happen when MATLAB returns back to the command line: # Memory leaked by any mex files is cleaned up (mxMalloc......

quasi 7 anni fa | 0

| accettato

Risposto
Error management in OOP framework.
I am not sure if this code helps you or not but have you tried subclassing MException to add an object? Things to look for ...

quasi 7 anni fa | 2

| accettato

Risposto
segmentation fault when access the pointer generated by mxMalloc written in C only in Ubuntu (works well in Windows)
It looks to me that the c code is coded for a 32 bit machine and needs updates to be compatible with 64 bit systems. This line ...

circa 7 anni fa | 0

Risposto
defining libpointer for boolean ouput using calllib() functions.
If you look at |libfunctions -full UraganLib| for isMotorReady it will require two inputs. All pointer arguments are passed bot...

circa 7 anni fa | 0

| accettato

Risposto
Performance of MATLAB instances over time
What you are describing sounds like fragmentation of the Windows memory manager. This <https://www.mathworks.com/matlabcentral/...

circa 7 anni fa | 0

Risposto
Does Matlab r2017a manage memory differently than r2016b? (out of memory issues)
There were no global changes in how R2017a manages memory. I expect your problem is due to a change in one function. What funct...

circa 7 anni fa | 0

Risposto
Will memory leaks happen when the MEX file contains new & delete or STL containers (C++)?
The short answer is: Put anything allocated with a standard allocator into a smart pointer (unique_ptr, shared_ptr,...) and nev...

circa 7 anni fa | 0

| accettato

Risposto
Creating variables consisting of many elements
If you don't mind strings and have R2017a I like: "x"+(1:10) Or if you want a cell array or have 2016b: cellstr(strin...

oltre 7 anni fa | 1

Risposto
Call .dll into MATLAB function/code and simulink
Your header file contains c++ code (namespaces for one). Loadlibrary has never supported c++ code in headers. You are free to ...

oltre 7 anni fa | 0

Risposto
How do I get function prototypes for PowerPoint add-in macros when using actxserver('PowerPoint.Application')?
I have never actually done this but I am going to give you an educated guess based on normal MATLAB use and error message interp...

oltre 7 anni fa | 0

| accettato

Risposto
How do I link a library (.dll and/or .lib) to my mex code?
The reference parameters will not work with loadlibrary because c does not support the "&" reference c++ syntax. To load this l...

oltre 7 anni fa | 1

Risposto
correct use of pointer arithmetic with lib.pointer
Assigning a new value to the base (original) pointer of a user created libpointer invalidates all pointers created from it. If ...

oltre 7 anni fa | 2

| accettato

Risposto
Mex programming for a beginner
I suggest a two pronged approach. # Get Loadlibrary working if at all possible. There is only one real error in your loadli...

oltre 7 anni fa | 1

Risolto


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

oltre 7 anni fa

Risolto


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

oltre 7 anni fa

Risolto


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

oltre 7 anni fa

Risposto
Problems with calling a function from a dll
Without an error message or description of what is going wrong all we can do is guess at it. I would start with this code inste...

oltre 7 anni fa | 0

Risposto
Dynamic allocation of mxArray structure
Although the code example you linked to will do the resizing operation on a structure and in general I like it better then the c...

oltre 7 anni fa | 0

Risposto
How to use memmapfiles safely for inter-process communication?
In MATLAB on Intel (x86) platforms I believe this code is safe and will work correctly. Because the communication process is to...

oltre 7 anni fa | 0

Carica altro