Answered
Possible to apply filter2 to only values above a limit?
Compute the filtered version for all pixels, and simply replace the pixels above a certain value with their filtered value: ...

7 years ago | 0

| accepted

Answered
Can classes be made unsaveable
No. When a class object is saved, the saveobj method for that class gets called, if it exists. If this method throws an error, i...

7 years ago | 0

| accepted

Question


Can classes be made unsaveable
Is there a way to define a class such that the MATLAB save() function throws an error when it tries to save an instance of that ...

7 years ago | 1 answer | 1

1

answer

Answered
Optimization problem - reducing the time needed to solve
ConstLM.m looks very inefficient to me. I think those loops can be vectorized. Profile your code, and learn about vectorization....

7 years ago | 0

Answered
Interpolation between matrices (image attached)
Your query location, (0,10), is in the center of your grid, so if you want a linear interpolation between the input matrices you...

7 years ago | 0

| accepted

Answered
difference between imadd and imfuse
Yes.

7 years ago | 0

| accepted

Answered
Saving axes to file - trouble with copyobj and export_fig
Regarding the error using export_fig, it seems you didn't install the package correctly.

8 years ago | 0

Answered
export_fig can't do Monospace?
Export_fig supports Courier, and that is monospaced. For hints on why the other fonts you mentioned might not be working, see...

8 years ago | 0

Answered
Is there a way to make device memory persist between CUDA MEX calls
Yes, you can reinterpret_cast the pointer to an integer of a sufficient bit length, e.g. uint64, and return this to MATLAB. Then...

8 years ago | 2

| accepted

Answered
Indexing multiple values over large array?
histc outputs the bin index of each input value in the second output argument. So you can do: [~, ind] = histc(vals); va...

8 years ago | 0

Answered
Gray Image to Color Indexed Image
Use the <http://www.mathworks.co.uk/matlabcentral/fileexchange/16233 sc()> package. A = sc(image, [0.4 1], 'hsv');

8 years ago | 0

| accepted

Answered
PNG image created in Matlab shows up as all black in imshow
If you read the imshow help text, you'll see that the range only applies to grayscale images. Try: imshow(double(A)/4095);...

8 years ago | 0

| accepted

Answered
How to optimise/vectorize loop containing the function "imrotate", using multiple images and angles as input
Assuming your 900 input images are all the same size, you could: # For each rotation angle, compute the location of each rota...

8 years ago | 0

Answered
bitget for array (count no. of bits)
I assume from your question that you actually want to do a vectorized bitcount, rather than a vectorized bitget. If that is corr...

8 years ago | 0

Answered
Which MATLAB operations/functions need speeding up?
Linear 2D interpolation for multi-channel images A common computation in computer vision, and many other fields, is sampling ...

8 years ago | 0

Answered
What functions can benefit from simple patching?
I gave a patch for saveas <http://www.mathworks.co.uk/matlabcentral/answers/13085#answer_17979 here>.

8 years ago | 0

Answered
Which MATLAB operations/functions need speeding up?
REPMAT Repmat is unnecessarily slow. Internally it produces an index array, which it then uses to create the output array. Th...

8 years ago | 0

Answered
Which MATLAB operations/functions need speeding up?
BSXFUN with builtin functions Bsxfun is useful in that it allows us to vectorize elementwise operations between arrays of dif...

8 years ago | 2

Question


Which MATLAB operations/functions need speeding up?
When using MATLAB, I sometimes come across a performance bottleneck caused by functionality that I believe could be much faster....

8 years ago | 23 answers | 3

23

answers

Answered
How should I compute the eigenvectors of a sparse, real, symmetric matrix?
Just convert the matrix to a full one, and use eig. Unless less you want just a few eigenvectors, then the decomposition using t...

8 years ago | 0

| accepted

Question


How should I compute the eigenvectors of a sparse, real, symmetric matrix?
I need to compute all the eigenvectors of a sparse, real, symmetric matrix, A. I've tried the following: >> [V, D] = eig...

8 years ago | 3 answers | 0

3

answers

Answered
Requirements for using parfor across multiple desktop PCs
You need a licensed copy of MATLAB and the Parallel Computing Toolbox on the PC running the parfor loop, and you need a licensed...

8 years ago | 0

| accepted

Question


Requirements for using parfor across multiple desktop PCs
I have several desktop PCs running Windows, connected over a network, all with access to a common file system. I would like to d...

8 years ago | 1 answer | 0

1

answer

Answered
problem with errorbars and export_fig
Export_fig exports error bars just fine. Try: x=1:10; y=x.^2-2*rand(size(x)); err=abs(x.^2-y); errorbar(x,y,err,...

8 years ago | 1

| accepted

Answered
Placing plots into multiple page pdf document
The <http://www.mathworks.co.uk/matlabcentral/fileexchange/31215-appendpdfs append_pdfs> function can concatenate separate pdf f...

9 years ago | 1

Answered
How to define paper orientation in export_fig for pdfs
The export_fig submission <http://www.mathworks.co.uk/matlabcentral/fileexchange/23629-exportfig description>, help text and the...

9 years ago | 0

Answered
Best way to share code within laboratory
We use a version controlled repository, stored on a central server.

9 years ago | 0

Answered
Mix raster / vector in ps / pdf plots
I believe <http://www.mathworks.com/matlabcentral/fileexchange/727 exportfig> (which is different from <http://www.mathworks.com...

9 years ago | 0

Question


How do I change figure mode programmatically?
My figure has the rotate/zoom tool selected, and I wish to deselect it programmatically. How can I do this?

9 years ago | 1 answer | 1

1

answer

Answered
Create a figure -exactly- a certain size
export_fig (or rather, print) appears to only export that part of the figure which is on screen. Make the figure small and use t...

9 years ago | 0

| accepted

Load more