Problem

Get ranking of a combination

I have the numbers pulled without replacement from the set [1 2 3 4 5 6 7 8 9 10 11 12 13]; They are then ordered from least to...

9 years ago | 1 | 45 solvers

Answered

How do I delete empty array among populated arrays?

You are probably better off not having variables named like this in the first place. <http://www.mathworks.com/matlabcentral/...

How do I delete empty array among populated arrays?

You are probably better off not having variables named like this in the first place. <http://www.mathworks.com/matlabcentral/...

9 years ago | 1

Answered

How to avoid for loops using compact array notation?

I find it very unlikely that this will be the bottleneck in your code. Have your run this through the profiler to confirm that ...

How to avoid for loops using compact array notation?

I find it very unlikely that this will be the bottleneck in your code. Have your run this through the profiler to confirm that ...

9 years ago | 0

Answered

How to have random groups( of 2 elements) from a squared matrix?

There are 24 four connected pairs. Three per row, three per column. I would generate a random integer from 1-numel(A) I wou...

How to have random groups( of 2 elements) from a squared matrix?

There are 24 four connected pairs. Three per row, three per column. I would generate a random integer from 1-numel(A) I wou...

10 years ago | 0

Answered

Recognizing shapes in (binary) matrix

If you KNOW that you are either dealing with a line or a circle, then could you look at the MajorAxisLength and MinorAxisLength ...

Recognizing shapes in (binary) matrix

If you KNOW that you are either dealing with a line or a circle, then could you look at the MajorAxisLength and MinorAxisLength ...

10 years ago | 0

| accepted

Answered

find subset of a set

>> all(ismember([1 3], [2 4])) ans = 0 >> all(ismember([1 3], [1 3 2 4])) ans = ...

find subset of a set

>> all(ismember([1 3], [2 4])) ans = 0 >> all(ismember([1 3], [1 3 2 4])) ans = ...

10 years ago | 1

| accepted

Answered

Allow Question Markup Capability with fewer Reputation Points

You have those privileges now on your own posts. That is a list of suggested things to do to OTHER people's posts when you ge...

Allow Question Markup Capability with fewer Reputation Points

You have those privileges now on your own posts. That is a list of suggested things to do to OTHER people's posts when you ge...

10 years ago | 0

Answered

Sign switching in a sequence

Look at the diff command. It will subtract each element from the next. Look at the sign of that calculation and you will be al...

Sign switching in a sequence

Look at the diff command. It will subtract each element from the next. Look at the sign of that calculation and you will be al...

10 years ago | 0

| accepted

Answered

How to make a mean image out of several images converted into a density map

The image you are dealing with is really just a matrix of numbers where the numbers represent the density. If every image is th...

How to make a mean image out of several images converted into a density map

The image you are dealing with is really just a matrix of numbers where the numbers represent the density. If every image is th...

10 years ago | 0

Answered

Efficient implementation of a functions with vector arguments

Do not worry about efficiency until you know it is a problem. I think you might be surprised where the bottlenecks in your code...

Efficient implementation of a functions with vector arguments

Do not worry about efficiency until you know it is a problem. I think you might be surprised where the bottlenecks in your code...

10 years ago | 0

| accepted

Answered

how to customize a colorbar?

Colorbar should not have any bearing on a line plot. Maybe you mean the 'colororder' property of the axes: >> get(gca, 'colo...

how to customize a colorbar?

Colorbar should not have any bearing on a line plot. Maybe you mean the 'colororder' property of the axes: >> get(gca, 'colo...

10 years ago | 0

Answered

Use of timer: what's the code to indicate that its period of time is expired?

It is not clear what you are asing, but this is a primer on timers. <http://blogs.mathworks.com/videos/2008/05/05/advanced-ma...

Use of timer: what's the code to indicate that its period of time is expired?

It is not clear what you are asing, but this is a primer on timers. <http://blogs.mathworks.com/videos/2008/05/05/advanced-ma...

10 years ago | 0

Answered

Creating a solid/surface of revolution from discrete data?

The profile you give represents the radius. Set it to whatever you want. Then you can translate the surface by adding a consta...

Creating a solid/surface of revolution from discrete data?

The profile you give represents the radius. Set it to whatever you want. Then you can translate the surface by adding a consta...

10 years ago | 0

Answered

How to set background as black without appearing in colorbar?

Axes have color. You could set the color of the axes. Then you can put NaN in the image on any pixel you want to be 'empty'.

How to set background as black without appearing in colorbar?

Axes have color. You could set the color of the axes. Then you can put NaN in the image on any pixel you want to be 'empty'.

10 years ago | 0

Answered

GUI AXES Object detecting

You are looking to set callbacks on the lines. This is similar: <http://blogs.mathworks.com/videos/2008/01/28/practical-ex...

GUI AXES Object detecting

You are looking to set callbacks on the lines. This is similar: <http://blogs.mathworks.com/videos/2008/01/28/practical-ex...

10 years ago | 0

Answered

Check each pixel for a specific color

MATLAB uses ones based indexing. There is no 0,0 element. Try starting at 1,1. A better way is like this: a = [11 22 3...

Check each pixel for a specific color

MATLAB uses ones based indexing. There is no 0,0 element. Try starting at 1,1. A better way is like this: a = [11 22 3...

10 years ago | 0

Answered

Rock, Paper, Scissors GUI?

<http://blogs.mathworks.com/videos/2013/02/06/introduction-to-gui-building-with-guide-in-matlab/ Intro to GUIDE Video> Check ...

Rock, Paper, Scissors GUI?

<http://blogs.mathworks.com/videos/2013/02/06/introduction-to-gui-building-with-guide-in-matlab/ Intro to GUIDE Video> Check ...

10 years ago | 0

Answered

A problem drawing a graph in matlab

Why not use the built in hist command in MATLAB to get a histogram?

A problem drawing a graph in matlab

Why not use the built in hist command in MATLAB to get a histogram?

10 years ago | 0

Answered

Problem changing FaceColor in contourm

It has been my experience that when you see a problem where the code works in debug mode, but not when run all at once, you need...

Problem changing FaceColor in contourm

It has been my experience that when you see a problem where the code works in debug mode, but not when run all at once, you need...

10 years ago | 0

| accepted

Answered

Merge imagesc and plot into same figure

i = magic(10) imagesc(i) imagesc(10:10:100, 10:10:100,i) When you call imagesc, if you do not give an X and Y vect...

Merge imagesc and plot into same figure

i = magic(10) imagesc(i) imagesc(10:10:100, 10:10:100,i) When you call imagesc, if you do not give an X and Y vect...

10 years ago | 0

| accepted

Answered

How to get the pixel values of an image in binary form?

>> <http://www.mathworks.com/help/releases/R2013a/matlab/ref/dec2bin.html doc dec2bin> This will give you the binary as strin...

How to get the pixel values of an image in binary form?

>> <http://www.mathworks.com/help/releases/R2013a/matlab/ref/dec2bin.html doc dec2bin> This will give you the binary as strin...

10 years ago | 0

Answered

Multi window Gui problem

<http://blogs.mathworks.com/videos/2011/11/23/passing-data-between-guide-callbacks-without-globals-in-matlab/ Passing data betwe...

Multi window Gui problem

<http://blogs.mathworks.com/videos/2011/11/23/passing-data-between-guide-callbacks-without-globals-in-matlab/ Passing data betwe...

10 years ago | 1

Answered

how to implement loops in a sturcture

There is a lot of indexing and confusion going on here. I recommend breaking down the problem into smaller, testable pieces. ...

how to implement loops in a sturcture

There is a lot of indexing and confusion going on here. I recommend breaking down the problem into smaller, testable pieces. ...

10 years ago | 0

Answered

Plot figures in property editor mode automatically

http://www.mathworks.com/help/releases/R2012b/matlab/ref/plottools.html These tools will 'remember' how they were configured ...

Plot figures in property editor mode automatically

http://www.mathworks.com/help/releases/R2012b/matlab/ref/plottools.html These tools will 'remember' how they were configured ...

10 years ago | 0

Answered

how do i retrieve the values from a plotted graph?

>> h = plot(rand(1,3)); >> get(h,'ydata') ans = 0.534064127370726 0.089950678770581 0.11170574419320...

how do i retrieve the values from a plotted graph?

>> h = plot(rand(1,3)); >> get(h,'ydata') ans = 0.534064127370726 0.089950678770581 0.11170574419320...

10 years ago | 0

Answered

How to relate or understand this code with math formula?

It looks like it is taking the delta between every vertex in the list and a specific vertex (a or b). It is then squaring t...

How to relate or understand this code with math formula?

It looks like it is taking the delta between every vertex in the list and a specific vertex (a or b). It is then squaring t...

10 years ago | 0

| accepted

Solved

Select every other element of a vector

Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

10 years ago

Answered

how can i display the image in GUI??

<http://blogs.mathworks.com/pick/2007/10/16/matlab-basics-setting-a-background-image-for-a-gui/ Video on setting an image in a G...

how can i display the image in GUI??

<http://blogs.mathworks.com/pick/2007/10/16/matlab-basics-setting-a-background-image-for-a-gui/ Video on setting an image in a G...

10 years ago | 0

Answered

What is status for?

To let you know the status, or output of the function. It varies based on each function. Read the doc for each function for de...

What is status for?

To let you know the status, or output of the function. It varies based on each function. Read the doc for each function for de...

10 years ago | 0

Answered

Play recorded video on gui and take frame from it

<http://www.mathworks.com/help/releases/R2012b/matlab/ref/videoreaderclass.html VideoReader class>

Play recorded video on gui and take frame from it

<http://www.mathworks.com/help/releases/R2012b/matlab/ref/videoreaderclass.html VideoReader class>

10 years ago | 0

| accepted