Question

Find closest 8-connected chessboard distance between multiple pairs of points: shortest m-path

I am working on binary images. I have two sets of points: PNodes and FNodes. I want to find the closest PNode to each of the FNo...

environ un an ago | 1 answer | 0

Question

Function similar to bwconncomp, but on 3D point clouds.

Is there a MATLAB function which does this: _Given a 3D matrix (say, point cloud) two adjacent pixels should be connected if...

plus d'un an ago | 0 answers | 0

Question

Element by element (xor) operation on cells.

I have two variables, |Test| and |Train|. |Test| = |cell| of dimension |10 x 1| and |Train| = |cell| of dimension |20 x ...

plus d'un an ago | 1 answer | 0

Question

Eliminate all rows with '\N' element in a cell

This is a simple question, but I'm getting confused cuz of the different datatypes in cell I have Cell_A (attached). I want t...

plus de 2 ans ago | 1 answer | 0

Answered

how to detect the value angle of rotation object ?

You can find the major axes of all the four objects. The direction of each of their major axis gives the angle of rotation.

how to detect the value angle of rotation object ?

You can find the major axes of all the four objects. The direction of each of their major axis gives the angle of rotation.

presque 3 ans ago | 0

Answered

Starting a new line

Are you typing your code in the Command Window? Then use "..." and < enter > <</matlabcentral/answers/uploaded_files/48325/Un...

Starting a new line

Are you typing your code in the Command Window? Then use "..." and < enter > <</matlabcentral/answers/uploaded_files/48325/Un...

presque 3 ans ago | 0

Answered

I'm trying to simplify an expression or equation symbolically and I get the same error every time. Undefined function or variable 'x'.

What exactly is your command? It seems like you haven't told MATLAB what the value of |x| is. First, initialize a value for |x| ...

I'm trying to simplify an expression or equation symbolically and I get the same error every time. Undefined function or variable 'x'.

What exactly is your command? It seems like you haven't told MATLAB what the value of |x| is. First, initialize a value for |x| ...

environ 3 ans ago | 0

| accepted

Answered

hello guys, i have mat file < 15151x723 double > but i want this file with 3 columns only. after 15151 rows i want next 3 columns should come bellow that.same with next 3 columns ...hope you understand...

Have you tried using |reshape|? If a = [1 2 3 4 5 6 10 20 30 40 50 60 100 200 300 400 500 600 1000 2000 3000 4000 ...

hello guys, i have mat file < 15151x723 double > but i want this file with 3 columns only. after 15151 rows i want next 3 columns should come bellow that.same with next 3 columns ...hope you understand...

Have you tried using |reshape|? If a = [1 2 3 4 5 6 10 20 30 40 50 60 100 200 300 400 500 600 1000 2000 3000 4000 ...

environ 3 ans ago | 0

Answered

how can i replace white pixel (in binary image) with a color pixel of another image?

I do this all the time. This is what I do: |mask| is the binary image mask (2D) (converted to logical values). |rgbImg| is th...

how can i replace white pixel (in binary image) with a color pixel of another image?

I do this all the time. This is what I do: |mask| is the binary image mask (2D) (converted to logical values). |rgbImg| is th...

plus de 3 ans ago | 0

Answered

How to have a contour with 4-connectivity?

Fill the image ( |imfill|). Use <http://in.mathworks.com/help/images/ref/bwboundaries.html |bwboundaries|> with |conn| = 4.

How to have a contour with 4-connectivity?

Fill the image ( |imfill|). Use <http://in.mathworks.com/help/images/ref/bwboundaries.html |bwboundaries|> with |conn| = 4.

plus de 3 ans ago | 0

| accepted

Answered

how to find pixels in donut slices

Do you mean the _intensity_ values of each pixel in an image? If so, use <http://in.mathworks.com/help/images/ref/imtool.html...

how to find pixels in donut slices

Do you mean the _intensity_ values of each pixel in an image? If so, use <http://in.mathworks.com/help/images/ref/imtool.html...

plus de 3 ans ago | 0

Answered

what does this error means-"Function definitions are not permitted at the prompt or in scripts."?

It means you are trying to define a function in the prompt or maybe within a different script. This is not permitted in MATLAB. ...

what does this error means-"Function definitions are not permitted at the prompt or in scripts."?

It means you are trying to define a function in the prompt or maybe within a different script. This is not permitted in MATLAB. ...

plus de 3 ans ago | 0

Answered

Save data to file with different array size

When you execute |A = [a b c d e];| don't you get an error? The dimensions of |a, b, c, d| & |e| aren't consistent. You cannot c...

Save data to file with different array size

When you execute |A = [a b c d e];| don't you get an error? The dimensions of |a, b, c, d| & |e| aren't consistent. You cannot c...

plus de 3 ans ago | 0

Answered

Want to find a specific column of needed data

Have you tried using <http://in.mathworks.com/help/matlab/ref/ismember.html#btcnv44-12 |ismember|>? I believe you can use a comb...

Want to find a specific column of needed data

Have you tried using <http://in.mathworks.com/help/matlab/ref/ismember.html#btcnv44-12 |ismember|>? I believe you can use a comb...

plus de 3 ans ago | 0

Question

Detect irregular dark spots in a gray scale image.

I require ideas to detect these kind of black spots in a gray scale image. <</matlabcentral/answers/uploaded_files/39748/Gra...

plus de 3 ans ago | 1 answer | 0

Answered

3D Point Cloud to 2D depth image

Use <http://in.mathworks.com/help/vision/ref/disparity.html |disparity|>.

3D Point Cloud to 2D depth image

Use <http://in.mathworks.com/help/vision/ref/disparity.html |disparity|>.

plus de 3 ans ago | 0

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

plus de 3 ans ago

Solved

Pizza value using expression with parentheses

Pizza prices are typically listed by diameter, rather than the more relevant feature of area. Compute a pizza's value (cost per ...

plus de 3 ans ago

Solved

Get the length of a given vector

Given a vector x, the output y should equal the length of x.

plus de 3 ans ago

Solved

Roll the Dice!

*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

plus de 3 ans ago

Solved

Distance walked 1D

Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

plus de 3 ans ago

Solved

Reverse the vector

Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

plus de 3 ans ago

Solved

Bottles of beer

Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

plus de 3 ans ago

Solved

The Hitchhiker's Guide to MATLAB

Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

plus de 3 ans ago

Solved

Summing digits

Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

plus de 3 ans ago

Solved

Length of the hypotenuse

Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

plus de 3 ans ago

Solved

Right and wrong

Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

plus de 3 ans ago

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

plus de 3 ans ago

Solved

Make a checkerboard matrix

Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

plus de 3 ans ago

Solved

Is this triangle right-angled?

Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

plus de 3 ans ago