Question


What are the internal differences between Matlab strings and character arrays?
Matlab strings were introduced in 2016b presumably to make working with a string more similar to other languages, as compared to...

6 years ago | 4 answers | 5

4

answers

Question


timer causes drawing problem when loading a figure
When running a GUI that has a timer callback, I notice that loading other GUI figures often fails (incorrect rendering). Is this...

6 years ago | 1 answer | 0

1

answer

Question


Best practices for mex coding
Hi all, As I'm starting to include mex code in my code library I find myself unaware of what some best practices may be when ...

6 years ago | 1 answer | 5

1

answer

Question


order of variable deletion and creation
Is the order in which the left hand side is deleted and the right hand side executed defined? i.e. output = createNewOut...

6 years ago | 3 answers | 0

3

answers

Question


editor occasionally unresponsive on macbook
I'm on a new macbook running 10.12.3 and occasionally, typically when opening the laptop, the editor is unresponsive to mouse cl...

7 years ago | 2 answers | 0

2

answers

Question


Unable to clear mex file
I'm compiling a mex file and then moving it up a directory so that it is in the Matlab path. The movefile command fails with the...

7 years ago | 1 answer | 1

1

answer

Answered
Get next plot color
In newer versions of Matlab the state is stored in the axes as 'ColorOrderIndex'. In 2016b, this wraps, and you can get values f...

7 years ago | 1

Answered
Why is it sometimes impossible to save the pathdef in 2014a?
A colleague of mine was having this issue. I was going to suggest to them that they edit their startup.m file to add all the pat...

7 years ago | 3

Answered
Get a subset of a structure array in mex
This is the code I ended up using. At the end of the day I essentially wanted to have an object "template" (i.e. field names def...

7 years ago | 0

| accepted

Question


Get a subset of a structure array in mex
Is it possible to get a subset of a structure array in mex? In other words, the mex equivalent of the following in Matlab: ...

7 years ago | 3 answers | 0

3

answers

Question


mxCreateStructArray and mxCreateStructMatrix field name memory management
I've been trying to find documentation on how the field names are managed with the structure creating functions in mex. Are the ...

7 years ago | 1 answer | 0

1

answer

Question


mexPrintf to standard error
Is it possible to direct the output of mexPrintf to standard error? I'd like something like in Matlab where you can do fprintf(2...

7 years ago | 1 answer | 0

1

answer

Answered
Fill out zeros/NaN in array with next value
I'm not entirely sure how you are generating the output, but you should be able to do something like: I = find(isnan(data))...

7 years ago | 0

Answered
cputime not working as expected
cputime measures the # of clock cycles (summed across all threads) that the Matlab process has used since Matlab started. Units ...

7 years ago | 1

| accepted

Question


cputime not working as expected
It seems like cputime does not work as advertised on Mac OSX 10.11.6 and Matlab 2016b or Windows 7 Matlab 2016a. cputime should ...

7 years ago | 2 answers | 0

2

answers

Answered
about using 'visual studio 2015 community' for compiler when we use 'mex' of command
This page links to supported compilers for previous releases (far right column): <https://www.mathworks.com/support/sysreq/prev...

7 years ago | 0

Answered
Using Visual Studio 2015 C++ as C/C++ compiler
The redistributable is not for compiling code. Per Microsoft: "The Visual C++ Redistributable Packages install run-time componen...

7 years ago | 1

| accepted

Question


mxSetData to subset of mxArray
Is it possible, perhaps with a certain set of restrictions on what the user can do, to assign data to an mxArray which is a subs...

7 years ago | 1 answer | 0

1

answer

Question


mxAddField/mxGetField with unicode name
I am trying to write code that allows for arbitrary field names in Matlab structures. I thought I had a decent solution, based o...

7 years ago | 1 answer | 1

1

answer

Question


fast initialization of cell array of strings mex
I'm looking to initialize a cell array of strings in mex as quickly as possible from a long array of characters with an addition...

7 years ago | 1 answer | 1

1

answer

Answered
How to find the Process ID (PID) in matlab
A .NET solution: name = 'excel'; %for example p = System.Diagnostics.Process.GetProcessesByName(name); if p.Length ==...

7 years ago | 3

Question


do timer callbacks all execute in the same thread
I recently tried to start a timer, have the single-shot callback permanently execute, and then launch another timer further on d...

7 years ago | 1 answer | 1

1

answer

Question


Getting data from asychronous mex function.
I am calling a windows function SetWindowsHookEx() which takes in a pointer to a function that gets called asynchronously. I'm c...

7 years ago | 2 answers | 1

2

answers

Answered
Set and get structure field with invalid name
I knew I had seen this somewhere before. Amro posted this link: <http://pastebin.com/j69kQEur> in the comments of this pos...

7 years ago | 0

| accepted

Question


Set and get structure field with invalid name
I'd like to get and set a structure with potentially invalid field names. Before digging into the mex myself I was wondering if ...

7 years ago | 3 answers | 0

3

answers

Question


profiling mex using gprof in windows
I'm using TDM-GCC to compile a C mex program in Windows. I'd like to profile it using gprof or really any program that will prof...

8 years ago | 1 answer | 1

1

answer

Question


Profiling mex in Windows
What are my options if I'd like to profile a mex file in Windows. I'm open to trying a specific compiler/workflow. Thanks, J...

8 years ago | 1 answer | 0

1

answer

Question


retrieve variables from workspace that is being debugged
I'm writing some code that is meant to provide information about code I am writing, including when not running (file or base wor...

8 years ago | 0 answers | 1

0

answers

Question


Executing code that's dynamically written to a file
Hi all, My goal is to write a function that executes whatever is copied to the clipboard. Importantly however, I'd like to pl...

9 years ago | 1 answer | 0

1

answer

Question


Is it possible to tell when Matlab is busy executing?
Is it possible to tell when Matlab is busy executing? I'd like to run some code on a timer but I'd rather not execute the main p...

9 years ago | 3 answers | 1

3

answers

Load more