回答済み
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...

1年以上 前 | 0

| 採用済み

回答済み
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...

1年以上 前 | 0

回答済み
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 ...

1年以上 前 | 0

回答済み
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...

1年以上 前 | 2

| 採用済み

回答済み
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...

1年以上 前 | 1

| 採用済み

回答済み
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...

2年弱 前 | 0

| 採用済み

回答済み
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:...

2年弱 前 | 0

回答済み
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...

2年弱 前 | 1

| 採用済み

回答済み
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...

2年弱 前 | 0

回答済み
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...

2年弱 前 | 1

| 採用済み

回答済み
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 ...

2年弱 前 | 0

| 採用済み

回答済み
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......

2年弱 前 | 0

| 採用済み

回答済み
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 ...

2年弱 前 | 2

| 採用済み

回答済み
Can I install MATLAB in Bash on Ubuntu on Windows?
I am curious *Why would anyone want to do this?* I can think of a few reasons, that I don't think are very good, but can think ...

2年弱 前 | 0

回答済み
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 ...

2年弱 前 | 0

回答済み
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...

2年弱 前 | 0

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

約2年 前 | 0

回答済み
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...

約2年 前 | 0

回答済み
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...

約2年 前 | 0

| 採用済み

回答済み
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...

約2年 前 | 1

回答済み
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 ...

約2年 前 | 0

回答済み
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...

約2年 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 1

回答済み
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 ...

2年以上 前 | 2

| 採用済み

回答済み
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...

2年以上 前 | 1

解決済み


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...

2年以上 前

解決済み


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".

2年以上 前

解決済み


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...

2年以上 前

回答済み
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...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

Load more