Réponse apportée
subtraction of each row with every other row
A=[1,2,3,4,5; 6,7,8,9,10; 11, 12, 13, 14, 15;16, 17, 18, 19, 20]; c = nchoosek(1:size(A, 1),2); c2 = [c; fliplr(c)]; B = ze...

presque 4 ans il y a | 0

Réponse apportée
Which is more efficient for iterative programs: while loops or terminating with an if statement and break command?
for the "%if statement with break": Suppose someArray has a million elements in it. If, in the 10th iteration, criteria(i)==1, ...

presque 4 ans il y a | 0

Question


How to remove for-loop in computing a vector of sums?
How to compute rcross vector without the for-loop? rcross = zeros( length(elementProduct) - prefixLen , 1 ); for ii = 1:...

presque 4 ans il y a | 1 réponse | 0

0

réponse

Réponse apportée
Why do we transfer the image into double?
MATLAB when using mixed mode arithmetic, will try to save memory. 250 + 10 = 260, right? >> x =double(250) + uint8(10); >> x ...

presque 4 ans il y a | 1

Réponse apportée
How to write multiple image from a for loop to a dir
I copied your method of writing the images to files and there were no problems. Irgb = imread('Lena.jpg'); J = Irgb...

presque 4 ans il y a | 0

Réponse apportée
I want to loop reading in several images. and then perform analysis on those images.
sumImage = OriginalImage + SecondImage + ThirdImage + FourthImage + FifthImage + SixthImage + SeventhImage + Image8 + Image9; Y...

presque 4 ans il y a | 0

Réponse apportée
Not enough input arguments
Cannot speak to your simulink model, but the MATLAB code below runs without error. time = 1:1/100:1000; theta = -pi/2:pi/(max(...

presque 4 ans il y a | 0

Réponse apportée
In "Analyzing Cyclical Data with FFT" example, how the frequency was calculated?
If n is even, the following is equivalent to your code: f = linspace(2/n, 1, n/2) * maxfreq;

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How to Cut multiple files from multiple folders in a for loop? Then return them to their own folders containing those cuts.
You can recursively find all files with a .wav extension using code from here: https://www.mathworks.com/matlabcentral/fileexch...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How can I fix the error?
Sometimes a simple transpose will solve the problem. Use size() and transpose accordingly.

presque 4 ans il y a | 0

Réponse apportée
how to i check if matrix cotaining logical 1
One simple way: if sum(B) > 0

presque 4 ans il y a | 0

Réponse apportée
biterr Error on 3D Matrix
Maybe I am not looking hard enough. >> the inputs must be either a vector or a matrix with mxn dimensions Only thing I saw in ...

presque 4 ans il y a | 0

Réponse apportée
How to generate two independent white noise
An easy way to think about the mean over a sample not being what you expected is to consider a fair coin having a head (H, give ...

presque 4 ans il y a | 0

Réponse apportée
Why is my code running so slowly in the while loop?
>>> while currentcycle > 1 currentcycle is not changing within the while-loop. You need to modify the value of currentcycle ...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Short time energy, st zero crossing etc.
See if this can help you with what you have already done. https://www.mathworks.com/matlabcentral/fileexchange/23571-short-time...

presque 4 ans il y a | 0

Question


biterr Error on 3D Matrix
B = [1 2 3; 4 5 6; 7 8 9]; size(B) % ans = 3 3 biterr(B,B) % ans = 0 Why does biterr work here, but not below? A =...

presque 4 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
Compare two text files from MATLAB Command Window using FC Windows 10 file comparison command
To handle spaces in filenames, I did the following: >> fn_baseline_str = 'A BC BASELINE.txt' >> fn_str = 'A BC.txt' ...

environ 4 ans il y a | 0

Question


Compare two text files from MATLAB Command Window using FC Windows 10 file comparison command
Currently, I am using visdiff to compare two text files. I do not want the GUI popup, nor do I want to get the full visdiff outp...

environ 4 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
There is an endless loop in the function "getCompleteIntervals".
I had a similar problem in MATLAB 2020a. I saw two single pre-allocated arrays defined before the parfor-loop. I made them doubl...

plus de 4 ans il y a | 1

Question


Plot only adjacent points that are close to each other
I got a good answer to my question: https://www.mathworks.com/matlabcentral/answers/543065-find-set-of-all-adjacent-points-that...

plus de 4 ans il y a | 2 réponses | 0

2

réponses

Question


Find set of all adjacent points that are close to each other
I would like to find in Y[n] a set of adjacent points that are close to each other, but I don't get all the desired points. For ...

plus de 4 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
List non-zero connected elements in a Matrix cluster given a starting bin
I took the brute force approach which appears to handle all the edge cases. I just mark one found bin at a time in recursive ca...

plus de 4 ans il y a | 0

| A accepté

Question


List non-zero connected elements in a Matrix cluster given a starting bin
I used MATLAB's histcounts2 to create a 10 row by 7 col matrix, H. I would like to create a set of non-zero bins that are connec...

plus de 4 ans il y a | 1 réponse | 0

1

réponse