Solved


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

6 years ago

Solved


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

6 years ago

Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

6 years ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

6 years ago

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.

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

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

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

6 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');

6 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);...

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

6 years ago | 0

Solved


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

6 years ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

6 years ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

6 years ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

6 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

6 years ago

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

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

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

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

6 years ago | 0

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

6 years ago | 23 answers | 3

23

answers

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

6 years ago | 2

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

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

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

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

6 years ago | 1 answer | 0

1

answer

Problem


Index one element in each vector of an array along a given dimension
Functions like min and max can return in their second output argument the index of the element in each vector along a particular...

7 years ago | 5

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

7 years ago | 1

| accepted

Solved


Animated GIF Creator
This Challenge is to execute the Function Template which has a fully functional Animated GIF creator of a shape related to a Zer...

7 years ago

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

7 years ago | 1

Load more