Community Profile

# Turlough Hughes

##### Last seen: Today
138 2019 年以降の合計貢献数

#### Turlough Hughes's バッジ

matlab code How to dived 400*500 image into 40*50 and calculate object area in each block. put all blocks in one imafe
You can find out which blocks are crops (according to your definitions) as follows: B = blockproc(Img, [40 50], @(block_struct)...

By using computervision toolbox I'm trying to play a video in MATLAB using this code, but only one frame is displayed on the window
You could do the following: a = vision.VideoFileReader('spur gear.avi' , 'VideoOutputDataType', 'double'); VideoPlayer = visio...

How can I compare distance (not only between two points, but also a set of points)
Dist = sqrt(diff(X,1,2).^2 +diff(Y,1,2).^2);

1日 前 | 0

Simulation Domain (Region)?
I would say what you want is the meshgrid function. Have a look at the <https://uk.mathworks.com/help/matlab/ref/meshgrid.html d...

2日 前 | 0

Is there a property to modify the marker size of a drawline graphics object?
I'm using the drawline function and wondering if it would be possible to modify the marker sizes? If for example we have the fol...

2日 前 | 0 件の回答 | 0

### 0

How to reshape a single column matrix in the following example?
If you write the following you can directly modify the CT_matrix, no need to separate it out into a column vector: ind_lte_20 =...

3日 前 | 0

| 採用済み

Take the sum of an array until a limit is reached determined by a vector of the same length
For a single result you could write the following to get the sum for an arbitrary track length of 10 mm, and you have the option...

4日 前 | 1

| 採用済み

Numbering options in a table
You could change Line 58 to the following: disp(crossSectionInfo.Resistance(str2double(result)))

4日 前 | 0

I don't get the correct output from my function
The function is correct. However, because this function outputs very large numbers depending on your range (in terms of absolut...

10日 前 | 0

| 採用済み

How could I make a callback that updates when the user moves an roi?
I'm making an app which loads and displays the same image side by side in app.UIAxes and app.UIAxes2. I have a rectangle roi obj...

13日 前 | 0 件の回答 | 0

### 0

To determine the number of distinct pairs of value(s) in each column of matrix.
You could do the following. First find rows where there is only one other element equal to the element in the first column idx ...

13日 前 | 0

| 採用済み

How to print contents of nested cell array to uitable?
I think the best thing to do is make another cell array, B, as follows: nRows = max(cellfun(@numel,A)) nCols = numel(A) B = c...

14日 前 | 0

| 採用済み

clustering nearest 5 elements of a data
You could do the following which is to find the 5 minimum absolute differences for each element in core. [~,idx] = mink(abs(dat...

14日 前 | 1

| 採用済み

Merge all rows in a cell into one row
Similar to numeric arrays writting NewC2LatLon(:) returns all the all elements of the array in a single column. However, I think...

19日 前 | 0

| 採用済み

find mean of 2d slice in 3d segmented volume
Ok I think I know what you want. Looking at the documentation for roipoly, I assume you got a binary image representing the regi...

19日 前 | 0

Finding the closest point on a line to another point
Solving for the discrete points is actually a lot easier. Using your data as follows: line.x = [1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5,...

| 採用済み

summing elements of an array until a value appears
Say your array is called data: q=2; data = [1 2 3; 1 3 2; 2 1 3; 1 0 3; 1 2 2]; % Includes rows without any values = q, and re...

Matlab corresponding values between matrices?
This will show values of B that exist in A and which are also less than N. result = B(ismember(B,A) & B<N) If you need find ...

Unexpected output form intersect (polyxpoly)
When you're using intersect to do what you have described you need to ensure you have inputs of either two polyshapes, a polyvec...

How to write a loop for this case?
I was also taking the route of putting them into a structure with a fieldname for each month. months = {'Jan','Feb','Mar','Apr'...

Image Processing Edge Detection
You could try the following modification. The main thing I did was use bwareafilt to filter out all but the largest area, then f...

The output matrix values are either 0 or 1 but i want it between [0,1]
When you load in the image the data type is uint8 - unsigned 8 bit integers. So you can't get values between 0 and 1 unless you ...

| 採用済み

dot product between system of vectors
Based on your description you can do the following, transpose the Y and then it's a straight forward case of matrix multiplicati...

Drawing Polygon shapes with data
You can draw the rectangles from your struct as follows: k = size(out,2); figure(), hold on for i = 1:k a = size(out(i)....

| 採用済み

How do i check the frequency of an element in a multi level cell array?
The following loads and concatenates all elements of your cell array, including the 1 x 2 string in result2{1,1}(7), into a sing...

| 採用済み

incorrect input to ezplot function
ezplot requires a function handle as an input whereas you are inputting a vector. Seeing as you have the results as a vector I t...

How can I concatenate two vectors?
How can I 'join vector C and signal to get a matrix? Depends on whether signal is a column vector or row vector If it's a co...

How to do operations on nested cell array?
This should hopefully work but i ament able to test it myself right now as I'm away from my computer. The idea is to pass onecel...

How do i plot maximum values
You weren't actually calling the function. Secondly, the function had no input argument for threshold so I've included that. I a...

| 採用済み

how can i add column in matrix?
Depends what you want in that column but you could for example add a column of zeros as follows: A = [A zeros(size(A,1),1)]

2ヶ月 前 | 0

| 採用済み