Question

Reorder Matrix Rows from the row with the most nonzero elements to the row with the least nonzero elements

I have a matrix with rows of values. I want to order the rows of the matrix so that the matrix with the most nonzero elements is...

2 months ago | 2 answers | 0

Answered

Modify K nearest neighbors search (knnsearch) to ignore the point in question

dist1a = nan(numel(x)); proximity = 1.000; save_criteria = 3; save_criteria2 = 2; for i = 1:SizeA for j = 1:(i-1) ...

Modify K nearest neighbors search (knnsearch) to ignore the point in question

dist1a = nan(numel(x)); proximity = 1.000; save_criteria = 3; save_criteria2 = 2; for i = 1:SizeA for j = 1:(i-1) ...

2 months ago | 0

| accepted

Question

Resolving discrepancy between the number of surfaces generated and the number of surface handles stored in cell array

I am running an algorithm that generates different sized surfaces. However, when I try to store the surface handles in a cell ar...

2 months ago | 1 answer | 0

Question

Modify K nearest neighbors search (knnsearch) to ignore the point in question

I am using knnsearch to find the index values of the nearset point to the point in question. My only problem is that I need to u...

3 months ago | 1 answer | 0

Question

Get the column number of the false values in a logical output

I am trying to get the column numebr of the false values in a logical output called 'index'. My code is below N = 50; A = 1:N...

3 months ago | 1 answer | 0

Answered

Error While running a while loop (index exceeds number of array elements)

There was a missing line of code that needed to be added to allow comparison test that seaches for repeated vectors to run prope...

Error While running a while loop (index exceeds number of array elements)

There was a missing line of code that needed to be added to allow comparison test that seaches for repeated vectors to run prope...

5 months ago | 0

| accepted

Question

Error While running a while loop (index exceeds number of array elements)

I am using a while loop to remove points from a matrix base on their proximity to another group of points in a separate matrix. ...

5 months ago | 2 answers | 0

Question

Add value to previous value while using a for loop

Hi I am trying to compute the summation of a series of two values and then dvide them using a for loop and calling a function. T...

6 months ago | 1 answer | 0

Question

Connect two points with invisible vector and evenly spaced markers along the vector between them and Access Marking coordinates to draw circles around them.

Hi, I am trying to use elements of this solution https://www.mathworks.com/matlabcentral/answers/233078-how-do-i-get-evenly-spac...

8 months ago | 1 answer | 0

Question

Sorting and selecting points into sub matrices based on proximity to each other.

Hi, I am sorting groups of points based on their proximity to the six points plotted on the boundary of the circle. Once the are...

8 months ago | 1 answer | 0

Question

Counting Total Number of Pixels by Color in a Segmented Image

Hello I have mutiple segmented images that I would like to count the number of white, red, and blue pixels in each image using a...

9 months ago | 1 answer | 0

Question

Use Period Marker to fill circles drawn using viscircles

Hi, I am trying to using the period marker to fill circles drawn using viscirlces but I cannot get the sizes to line up exaclty....

9 months ago | 1 answer | 0

Question

Determine the percentage of black pixels within a circle

Hello, I am trying to determine the total number of pixels within the blue circle (radius = 80 dimensionless units) and the perc...

9 months ago | 1 answer | 0

Question

Add Consecutive Numbers sent to a Matrix in a Matlab Function

Hello, I am writing a function that adds the second value sent to a matrix to the first, the thrid number to the sum of the firs...

10 months ago | 1 answer | 0

Question

Selecting min value per row unless min value is repeated in another row.

Hi, I have a matrix of values shown below. I want to keep the lower value in each row, unless that lower value is repeated in an...

1 year ago | 1 answer | 0

Answered

Remove a number and its duplicates, not just the repeated values i.e. the way the unique function operates

Follow the method on the link provided below. https://www.mathworks.com/matlabcentral/answers/501734-selecting-min-value-per-ro...

Remove a number and its duplicates, not just the repeated values i.e. the way the unique function operates

Follow the method on the link provided below. https://www.mathworks.com/matlabcentral/answers/501734-selecting-min-value-per-ro...

1 year ago | 0

| accepted

Question

Remove a number and its duplicates, not just the repeated values i.e. the way the unique function operates

Hi, I am trying to remove both the number itself and its duplicates from my matrix. For example if A was the matrix (column vect...

1 year ago | 2 answers | 0

Question

return the row and column of values in a matrix as a single row vector stored in a separate matrix

Hello I have a matrix which I am trying to get the row and column numbers of all values less than 12 in my matrix. I wish to rep...

1 year ago | 1 answer | 0

Question

Sorting a data set to report failing values in pairs instead of individually

Hello, I am working with a set of 10 xy pairs of points in my data set. I sort the data based on how far apart the 10 points are...

1 year ago | 1 answer | 0

Question

Define an if statement based on on finding duplicate xy pair values between arrays.

Hello, I have 2 arrays of different sizes which I am trying to compare for duplicates using an if statement. The condition to ac...

1 year ago | 1 answer | 0

Question

Placing annotations at specific xy coordinates

Just wondering but I wanted to put annotations/text boxes at specific coordinates but when I read up on the page I saw that the ...

1 year ago | 3 answers | 0

Question

Link specific coordinates to a color when plotting them

Hello I am wondering if there is a way to link specific coordinates in a matrix to always be plotted in a specific color. like i...

1 year ago | 2 answers | 0

Question

Sorting points based on comparing distances.

Hello, I am using matlab 2019a and I am trying to sort points based on comparing the distance between them. I use the pdist2 fun...

1 year ago | 2 answers | 1

Question

Target just the last added entries to a matrix

Hey, I am working with matrices and I wanted to know if there is a standard way/code to target just the last added entries to a ...

1 year ago | 1 answer | 0

Question

Drawing lines from 2 or more separate points to one target point and calculating the distance between them

Hello, I have a plot where I create random points scattered around a set of central points. I am trying to draw lines from the 2...

1 year ago | 1 answer | 1

Question

Using viscircles to draw circles around points.

Hello, I am trying to draw to circles using viscircles but some of the circles end up in random space instead of around the cent...

1 year ago | 1 answer | 0

Question

Deleting circles drawn using viscircles

Hello, I am trying to delete a group of circles drawn on my plot using viscircles. I have saved the group to a handle, but when ...

1 year ago | 1 answer | 0

Question

Use conditional statements to separate elements from a single array into 2 new arrays

Hello, I am trying to separate elements from a matrix A (10x2) using conditional statements. I compare the distances between th...

1 year ago | 1 answer | 0

Question

Data Linking And value reassignment for variables

Hello, I need to reassign selected plotted points to NaN values and update my graph so that they no longer show up on the graph ...

1 year ago | 1 answer | 0