Answered

Returning and passing void pointers to mex functions

Whilst you are not interfacing to a C++ class, much of a similar discussion on how to reuse a pointer to a C++ class is relevant...

Returning and passing void pointers to mex functions

Whilst you are not interfacing to a C++ class, much of a similar discussion on how to reuse a pointer to a C++ class is relevant...

5 years ago | 1

Answered

How to prevent Matlab from GPU switching on Macbook Pro?

If you don't need the desktop, then you can run the command window only version of MATLAB by calling the following in a terminal...

How to prevent Matlab from GPU switching on Macbook Pro?

If you don't need the desktop, then you can run the command window only version of MATLAB by calling the following in a terminal...

5 years ago | 0

Answered

Which MATLAB operations/functions need speeding up?

Matrix operations involving the transpose of a sparse matrix, especially J' * J and J' * K, where J is a very tall matrix. Const...

Which MATLAB operations/functions need speeding up?

Matrix operations involving the transpose of a sparse matrix, especially J' * J and J' * K, where J is a very tall matrix. Const...

5 years ago | 0

Answered

Are the values in each compressed column of a sparse matrix stored in order?

Since it is possible to write the column data in any order from a mex file, I would say *no*. However, I tried three methods ...

Are the values in each compressed column of a sparse matrix stored in order?

Since it is possible to write the column data in any order from a mex file, I would say *no*. However, I tried three methods ...

5 years ago | 0

Question

Are the values in each compressed column of a sparse matrix stored in order?

If I have a sparse column vector (e.g. a column of a sparse matrix), and I'm accessing the elements of that vector in a mex file...

5 years ago | 1 answer | 0

Question

Debugging C++ mex files in Xcode 7 on El Capitan

I have just migrated to MAC OS, and am trying to debug a mex file for the first time. I'm using MATLAB R2015b and Xcode 7.0.1 on...

5 years ago | 2 answers | 1

Question

How do *you* debug mex files on Mac OS

I'm having trouble <http://uk.mathworks.com/matlabcentral/answers/249023-debugging-c-mex-files-in-xcode-7-on-el-capitan debuggin...

5 years ago | 2 answers | 2

Answered

imagesc() Y Axis Log Scale Not Working (Help!)

If you want to avoid pcolor, you can resample the image at the log scale locations, then use imagesc to display that.

imagesc() Y Axis Log Scale Not Working (Help!)

If you want to avoid pcolor, you can resample the image at the log scale locations, then use imagesc to display that.

5 years ago | 0

Submitted

Bitcount & bitwise hamming distance

Count the set bits in vectors, and compute bitwise hamming distances between sets of vectors

5 years ago | 5 downloads |

Answered

Which MATLAB operations/functions need speeding up?

TYPECAST Typecast uses a deep copy rather than a shared data copy, as explained by James Tursa in his <http://www.mathworks.c...

Which MATLAB operations/functions need speeding up?

TYPECAST Typecast uses a deep copy rather than a shared data copy, as explained by James Tursa in his <http://www.mathworks.c...

5 years ago | 0

Submitted

Figure control widget

Intuitive manipulation of a figure using key and mouse gestures

5 years ago | 2 downloads |

Question

Is A./B different from B.\A?

Given two matrices, A and B, will A./B ever give a different answer from B.\A, or are these two expressions equivalent? It se...

5 years ago | 2 answers | 1

Answered

Which MATLAB operations/functions need speeding up?

IMFILTER with separable filters on multi-channel images. This particular use case of imfilter is actually slower than using c...

Which MATLAB operations/functions need speeding up?

IMFILTER with separable filters on multi-channel images. This particular use case of imfilter is actually slower than using c...

5 years ago | 0

Answered

Which MATLAB operations/functions need speeding up?

It needs a NOP function - a builtin function which does absolutely nothing, but extremely quickly. In compiled languages like...

Which MATLAB operations/functions need speeding up?

It needs a NOP function - a builtin function which does absolutely nothing, but extremely quickly. In compiled languages like...

5 years ago | 0

Answered

Creating movie from Images from a for loop

Produce your images programmatically, rather than by exporting a figure, if you can, as it will be much faster. <http://www.math...

Creating movie from Images from a for loop

Produce your images programmatically, rather than by exporting a figure, if you can, as it will be much faster. <http://www.math...

5 years ago | 0

| accepted

Question

Given a named function, how can I call this function, and not the subfunction of the same name?

My function is passed the name of a function (as a string). It just so happens that my function contains a subfunction of that n...

5 years ago | 3 answers | 0

Answered

combining many RGB images into one image

You can display a cell array of images using <http://www.mathworks.com/matlabcentral/fileexchange/22387-imdisp imdisp>. imdi...

combining many RGB images into one image

You can display a cell array of images using <http://www.mathworks.com/matlabcentral/fileexchange/22387-imdisp imdisp>. imdi...

5 years ago | 0

Answered

In mex files, where does output to stdout and stderr go?

In a C++ mex file you can output std::cout to the command line, by putting the following code somewhere in your mex file: c...

In mex files, where does output to stdout and stderr go?

In a C++ mex file you can output std::cout to the command line, by putting the following code somewhere in your mex file: c...

5 years ago | 2

Answered

scatter plot with 4 different background color

figure; im = rand(2, 2, 3); image([0 1], [0 1], im); hold on a = rand(10,1); b = rand(10,1); scatter(a, b); The...

scatter plot with 4 different background color

figure; im = rand(2, 2, 3); image([0 1], [0 1], im); hold on a = rand(10,1); b = rand(10,1); scatter(a, b); The...

6 years ago | 0

Answered

How to optimize this matlab code?

Use <http://www.mathworks.com/matlabcentral/fileexchange/8773 multiprod> as follows: y = reshape(multiprod(multiprod(W_matr...

How to optimize this matlab code?

Use <http://www.mathworks.com/matlabcentral/fileexchange/8773 multiprod> as follows: y = reshape(multiprod(multiprod(W_matr...

6 years ago | 0

| accepted

Answered

How to determine the MATLAB version when compiling C/C++ mex files

matrix.h contains the following: #define MX_API_VER 0x07040000

How to determine the MATLAB version when compiling C/C++ mex files

matrix.h contains the following: #define MX_API_VER 0x07040000

6 years ago | 0

Question

How to determine the MATLAB version when compiling C/C++ mex files

MATLAB's C/C++ mex interface changes from time to time, with new releases of MATLAB. Functionality can be added, removed or chan...

6 years ago | 4 answers | 1

Submitted

betafit_fast

Quickly compute the parameters of a beta distribution

6 years ago | 1 download |

Answered

Which MATLAB operations/functions need speeding up?

CROSS It is shameful how slow this basic function is. I wrote my own (still in standard MATLAB), and it was 5 times faster. B...

Which MATLAB operations/functions need speeding up?

CROSS It is shameful how slow this basic function is. I wrote my own (still in standard MATLAB), and it was 5 times faster. B...

6 years ago | 2

Answered

What features and improvements do you hope to see in HG2?

Texture mapping of arbitrary meshes. See <http://www.mathworks.com/matlabcentral/answers/183980-how-can-i-texture-map-an-arbitra...

What features and improvements do you hope to see in HG2?

Texture mapping of arbitrary meshes. See <http://www.mathworks.com/matlabcentral/answers/183980-how-can-i-texture-map-an-arbitra...

6 years ago | 0

Question

How can I texture map an arbitrary mesh

Surf() and surface() allow me to texture map a regular quadrangular mesh. How can I texture map an irregular triangular mesh, of...

6 years ago | 0 answers | 0

Question

Fastest way to compute J' * J, where J is sparse

I have a sparse rectangular matrix, J, for which I want to compute: >> H = J' * J; It's a bit slow (transpose is taking ...

6 years ago | 2 answers | 1

Answered

What features and improvements do you hope to see in HG2?

Some volume rendering capabilities, similar to <http://www.voreen.org/ voreen>.

What features and improvements do you hope to see in HG2?

Some volume rendering capabilities, similar to <http://www.voreen.org/ voreen>.

6 years ago | 0

Answered

What features and improvements do you hope to see in HG2?

Support for all fonts, not a limited subset, in vector graphics export.

What features and improvements do you hope to see in HG2?

Support for all fonts, not a limited subset, in vector graphics export.

6 years ago | 1