Answered
Problem with Frequency distribution plot
If x is not uniformly spaced then use interp1 or spline to get x and z uniformly spaced. Then call fft(z). ft = fft(z); plot(...

3 years ago | 0

Answered
How to loop through a specific file in various subfolders inside a main folder?
Try this robust and well commented demo: % Finds all the subfolders under a top level folder and then for each subfolder, proce...

3 years ago | 0

Answered
Fill area between x-y data
The polygon with the maximum density would be one that starts at one point and then snakes around until it has "grabbed" every p...

3 years ago | 0

Answered
The number of elements in A and B must be the same
Perhaps you want just a single random number drawn from a Gaussian distribution: randomNumber = desiredStdDev * randn(1) + desi...

3 years ago | 0

Answered
Create images in B/W, grayscale, RGB
See the FAQ: https://matlab.fandom.com/wiki/FAQ#How_do_I_create_a_circle?

3 years ago | 0

Answered
Find distance between a circle and a polygon?
You can use bwboundaries to get the (row, column) coordinates of the polygon blob. boundaries = bwboundaries(mask); b = boun...

3 years ago | 0

Answered
Error when reading the text file
It's a highly corrupted file - it's a dumpster fire. Numbers are missing on some lines, and many lines are blank with no ...

3 years ago | 0

Answered
how to find the corresponding elements in a matrix/excel
Try this: t = readtable('FinalBookExcel.csv') % Lets specify row 2, column 1 and get the value there. row = 2; t21 = t.Cotto...

3 years ago | 1

| accepted

Answered
Most efficient way to separate numerically labeled objects that share borders?
You don't need bwlabel, like KSSV suggested, because your matrix is already labeled. You can simply use oneBlob = ismember(IM...

3 years ago | 0

Answered
็็How can I delete shadow in this picture
You're best off using a different lighting geometry so that you don't have the shadow in the first place. But if you must have ...

3 years ago | 0

Answered
Detect the boundary in a 2 clustered colored image
You get a mask for the yellow, then call bwboundaries and then use sqrt (optional) and min: boundaries = bwboundaries(yellowMas...

3 years ago | 1

| accepted

Answered
How to calculate whether two sets of images differ in spatial frequency?
I don't have a script but what I'd do is for each set, compute the fft2 of each image. Then add up all the FFT's of all the ima...

3 years ago | 0

Answered
Creating a cosine oscillation ( cos(2 * pi * f * k * T) )
A cosine wave is of the form y = Amplitude * cos(2 * pi * omega * time) So for your formula Amplitude = 50; and I beleve T i...

3 years ago | 0

Answered
image processing, k nearest neighbor
Here's simple demo, attached, that operates on (x,y) data.

3 years ago | 0

Answered
zoom image interactively maintaining a square zoom field
Try using a scroll panel. See attached demo.

3 years ago | 2

| accepted

Answered
Matlab Code: Eval and Sub2ind

3 years ago | 0

Answered
convolution without conv function
Attached is a "manual" way to do convolution. It will be straightforward to adapt it from 2-D images to 1-D vectors if you want...

3 years ago | 0

Answered
What to do if i accidentally named two files the same name, and cant find one of them now.
Go to https://www.voidtools.com/ and download a utility called Everything. It's like the Windows File Explorer search except wa...

3 years ago | 0

| accepted

Answered
how to loop through a folder
Try this: % Optional initialization steps clc; % Clear the command window. close all; % Close all figures (except those o...

3 years ago | 0

Answered
bypass an "if" within another using a flag
Since the b>c test occurs only inside the a>b block, and it's the only thing in the a>b block, you could simply do if a>b && b>...

3 years ago | 0

Answered
I have a problem with appdesigner, can you help me?
See the FAQ: https://matlab.fandom.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI(s)?

3 years ago | 1

Answered
I have a problem with appdesigner, can you help me?
if app.checkBox.Value uiwait(helpdlg('The checkbox is currently checked.')) else uiwait(helpdlg('The checkbox is curr...

3 years ago | 2

Answered
Extract data from a histogram
Try this: grayImage = imread('cameraman.tif'); subplot(2, 1, 1); imshow(grayImage, []); subplot(2, 1, 2); imhist(grayImage)...

3 years ago | 1

| accepted

Answered
drawing gaussian wave in matlab
Try this: % Optional initialization steps clc; % Clear the command window. close all; % Close all figures (except those o...

3 years ago | 0

Answered
Adjust regionprops orientation to 0-360 degrees
We can't do much without an image. But after rotation, you'd have to determine if the head was at the top or bottom somehow, or...

3 years ago | 0

Answered
i'm new to matlab. i need to use a tracking software and got this error, need help
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this: TUTOR...

3 years ago | 0

Answered
How to declare Rayleigh random variables ?
Did you try random in the Statistics and Machine Learning Toolbox. It can produce random numbers drawn from a Rayleigh distribu...

3 years ago | 0

Answered
How can I put images in a table using gui?
Perhaps try undocumentedmatlab.com https://undocumentedmatlab.com/?s=images+table https://undocumentedmatlab.com/articles/imag...

3 years ago | 1

Answered
How can I place the cancerous area on the CT image and separate it into ROI and non-ROI?
OK, here is an example.

3 years ago | 0

| accepted

Answered
I have boundaries of objects in my code. I want to use those boundaries to calculate the features of those objects in my preceding loop. please help fix
You don't need that inside loop over size(B, 1). You can simply get all the values like % Calculate region properties for each...

3 years ago | 1

| accepted

Load more