Answered
Background subtraction for image extraction
If you just want to get the red ones, try the Color Thresholder app on the Apps tab of the tool ribbon. If you want to do it ba...

16 días ago | 0

Answered
4 x 4 Mask to Identify Regions on Map with Highest Value
Try this: % Demo to find 4x4 regions with the highest sum value. clc; % Clear the command window. fprintf('Beginning to ru...

16 días ago | 0

| accepted

Answered
Array indices must be positive integers or logical values.
See the FAQ for a thorough discussion of the error. https://matlab.fandom.com/wiki/FAQ#.22Subscript_indices_must_either_be_real...

16 días ago | 0

Answered
Blur edges of rectangles in the image
kumara, try this. Adapt parameters as needed to control the size and amount of the blur. % Demo to blur edges of rectangles, b...

16 días ago | 0

| accepted

Answered
How to crop circle from an image?
To process a sequence of images, see the code in the FAQ: https://matlab.fandom.com/wiki/FAQ#How_can_I_process_a_sequence_of_fi...

16 días ago | 1

| accepted

Answered
The training images are of size 2062x3545x3 but the input layer expects images of size 32x32x3.
Below is a script I use to resize my images to 224 by 224 for Alex net. Adapt as needed. % Resizes images to a size of 224x224...

16 días ago | 0

Answered
Does anyone knows how to star pattern print trapeze ? like the example below
So, do you know about fprintf()? You can simply call fprintf() 4 times to make those 4 lines. How do I get help on homework qu...

16 días ago | 0

Answered
Problem with using `reshape` to reorder the matrix.
Did you just try a dumb for loop? m = reshape(1:63, 3, 21) [rowsm, columnsm] = size(m) outputColumns = 7 % Columns to "lock" ...

17 días ago | 0

Answered
Sum particular adjacent elements
No, you don't understand what convolution is. With convolution, the kernel gets flipped top-to-bottom, and left-to-right. Ther...

17 días ago | 0

| accepted

Answered
reduction image using spline interpolation
smallImage = imresize(rgbImage, 0.5);

17 días ago | 1

Answered
I want to reconstruct an image of circles with noise
Maybe you want to use scatteredInterpolant(), like my attached demo. It takes x, y, value coordinates and builds up an image. ...

17 días ago | 0

Answered
Detection of Particle Orientation
Use regionprops(): % Code to detect angle of a blob. % By Image Analyst clc; % Clear the command window. fprintf('Beginni...

17 días ago | 1

| accepted

Answered
MATLAB export_fig crops title
If you have r2020a, you can try exportgraphics() instead.

17 días ago | 1

Answered
Display or print char data
I would use fprintf() instead of disp(). I also wouldn't use the same variable to be a double, and a string, at different times...

17 días ago | 0

Answered
mapping of datas in -pi to pi to 0 to 2*pi
Do you want to just shift, like this data = data + pi; or do you want to shift and rescale, like this: data = rescale(data, 0...

17 días ago | 0

Answered
Counting Objects and area covered by objects
Use the Color Threshold app on the Apps tab of the tool ribbon. Tell it to use HSV color space. Then play around with the slid...

17 días ago | 1

| accepted

Answered
How to extract the blob in the middle of a binary image
Use imclearborder(bw). Here is the full demo: clc; % Clear the command window. fprintf('Beginning to run %s.m ...\n', mfil...

17 días ago | 1

| accepted

Answered
I keep getting "Index in position 1 is invalid. Array indices must be positive integers or logical values." error when trying to use the plot function
See the FAQ for a thorough discussion: https://matlab.fandom.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F

18 días ago | 0

Answered
How will I write a code for a stack of diamond in matlab?
Make just one square with 4 coordinates. Then put into a loop where you add the required x and y offset to the set of 4 coordin...

18 días ago | 0

Answered
How to transform a ellipse to circle
Are you just worried that your x and y are distorted, like digitally it's roughly round but because of the shape of the figure w...

18 días ago | 0

Answered
How can I write this to run more quickly, without a loop?
How big is your array? I tried 10 thousand by 10 thousand, and got it down from 1.05 seconds to 0.67 seconds with this vectoriz...

18 días ago | 0

| accepted

Answered
MIsmatch between left and right side
What is img_w and y_up? How did you get img_w (I'm guessing you used the size() function incorrectly for an image). So, since ...

19 días ago | 0

| accepted

Answered
Radio button value does not update state
Call drawnow as soon as you set the state of the radio button: while whatever % other code % Now change the radio but...

19 días ago | 0

| accepted

Answered
Finding average radius of a binarized image of a circle
If you just want the equivalent circular diameter, you can ask regionprops(). props = regionprops(mask, 'EquivDiameter'); EC...

19 días ago | 0

| accepted

Answered
can meaning of ~= be "equal to" ?
I think he made a mistake. It's been known to happen. My Professor gave us an errata sheet for his book that we were contantly...

19 días ago | 0

Answered
Extracting a specific digit from a float w/o floating-point implementation rounding issues
Use sprintf() to round the number to a string with 4 digits, then extract the 4th digit after the decimal point and convert it t...

19 días ago | 0

Answered
Error while run the code
Bran Ton wrote some non-robust code when he did this: [img_h, img_w] = size(img); Never do that with an image. If img happens...

19 días ago | 1

| accepted

Answered
How can I create a variable number of arrays and plot in the same image?
FAQ: https://matlab.fandom.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F

19 días ago | 0

Answered
I WANT TO KNOW WHY SO MUCH "." (dot) to define a statement, and does it mean something. Swarm.Particles(k).X ???
Swarm is a structure. It has one field called Particles. That field is another structure, but actually not a simple structure,...

19 días ago | 0

Answered
Get the numbers of rows where values change
By the time you get down to row 3, nothing has changed yet. Row 3 is still the same as rows 1 and 2. Don't you mean 4, 6, and ...

19 días ago | 0

| accepted

Load more