Answered
Making graphs appear in a grid
There are many modified version of |subplot| in the FileExchange, see: <https://www.mathworks.com/matlabcentral/fileexchange/?ut...

9 years ago | 0

Answered
controlling the transparency of the overlay image
C = imfuse(A,B,'blend'); imwrite(C, 'YouImage.png'); Or perhaps you want: alpha = 0.6; C = alpha * A + (1 - alph...

9 years ago | 1

| accepted

Answered
Routine to rename imported excel files
"Optimize for speed" implies that the problem must be identified at first: In which commands is the most time spent? It is not w...

9 years ago | 0

Answered
how to show title msgbox complete
Either use a shorter title. The title bar of the figure is not a good location for storing meaningful information. Or increas...

9 years ago | 0

Answered
How to assign a structure name using an index?
This topic is discussed almost daily. The answer is always the same: Don't do this! See <http://www.mathworks.com/matlabcentral/...

9 years ago | 2

| accepted

Answered
how to extract strings between two newline characters using regexp
S = sprintf('\n1 2\n3 4\n') C = strsplit(S, '\n');

9 years ago | 0

Answered
I need to align two signals that have a time shift to be able to take the differential of them
What aboput using Matlab's <https://www.mathworks.com/help/signal/ref/xcorr.html xcorr> function to determine the shift automati...

9 years ago | 0

Answered
Return figure handle from a function
function FigH = liner(a,b) LineH = plot(a,b); FigH = ancestor(LineH, 'figure'); end This replies the figure the p...

9 years ago | 5

| accepted

Answered
Efficient way to find the eventual slope of graph?
What about using |polyfit| to fit a line to the data. Then determine the standard deviation and crop the initial part, which dif...

9 years ago | 0

Answered
Matlab floating point arithmetic and sensitive dependence
The only problem is concealed in the sentence: However when I try to replicate this with the following test: ... Even wit...

9 years ago | 0

| accepted

Answered
Why is my script so slow? Eratosthenes
Even K(end+1) is not efficient. The iterative growing of an array is a severe mistake. See this example: K = []; for i =...

9 years ago | 0

| accepted

Answered
Addressing folder with varying name of in a path
With modern Matlab versions: pattern = ['C:\datasets\dataset_Experiment1\segments_all\**\file'; FileList = dir(pattern)...

9 years ago | 0

Answered
measure the size of lines in binary images
I the start points are numbered from left to right, the lines 1, 4, 7 overlap such, that it cannot be seen clearly, to which of ...

9 years ago | 0

Answered
MATLAB with some BUGS)
I'm absolutely convinced that Matlab does not break out of loops without beeing instructed to do so, never, and under no circums...

9 years ago | 3

Answered
Out of memory - an alternative to this algorithm?
This note seems to be important: combinations the number of combinations in E_perms, a matrix holding (1/L + 1)^n possib...

9 years ago | 0

Answered
switch with "ignore case" -> switchi
|switch| can operate on numerical data also. Then a "switchi" is not meaningful and would lead to ambiguities: if rand < 0....

9 years ago | 1

| accepted

Answered
Splitting a row into groups and calculating the mean
The daily mean can be obtained by |reshape|: x = rand(1, 56000); md = mean(reshape(x, 4, []), 1); % daily mean To o...

9 years ago | 0

Answered
Comparing two matrices to find and eliminate similarities?
When I ignore the ambiguities, perhaps you need something like this: A = {'a', 1; 'b', 2; 'c', 3; ...

9 years ago | 0

| accepted

Answered
Matlab compiler by MATLAB Runtime
"Files required for your application to run" sounds fine. Did you try it? If so, please explain in detail, what you observe.

9 years ago | 1

Answered
Alternative to circshift function?
According to the documentation all you have to change for a perfect backward compatibility is: a_vector3 = circshift(a__pre...

9 years ago | 0

| accepted

Answered
Delete lines n to m in many text files
folder = '???' for iFile = 1:500 % Create file name: File = fullfile(folder, sprintf('R%d.txt', iFile)); % ...

9 years ago | 0

| accepted

Answered
what is the suitable function to track peaks and measure the distance between them
I'd start with |findpeaks|. After knowing the location of the peaks, it matters if the relation between the peaks is uniquely de...

9 years ago | 0

Answered
i want to delete a .bmp file in a folder by using its filepath from mysql table.
The question is not clear. The posted code does not concern the problem of deleteing the file. The file name is taken from a GUI...

9 years ago | 0

| accepted

Answered
Updating a matrix based on conditions in other matrixes
Start with cleaning the code by avoiding all repeated calculations inside the loop: k = 1; pos_neg = [1;1;0]; E ...

9 years ago | 0

Answered
how to install a 32 bit MATLAB on windows 7
The public forum cannot distribute trial versions. The official download pages available if you have a Matlab license do not off...

9 years ago | 0

Answered
Hwo to use ichol as cholinc
"It doesn't work" is a weak description of the problem and it is hard to suggest an improvement. Perhaps this helps: <https://st...

9 years ago | 1

Answered
How to randomly sample column1 from a matrix for rows with a specific value in column 2
XX = randsample(X(Y == A), k) This chooses k elements from X at the positions where Y equals A.

9 years ago | 0

Answered
why do we need to normalize data in matlab? what is the purpose?
Normalization of an array is applied, if data in a specific range is required. If you e.g. want to create a gray scale image ...

9 years ago | 0

| accepted

Answered
How to manipulate contents of a large cell array
Create a loop over the cells and extract and join the wanted column. Do this for each column and export it to the Excel sheet: ...

9 years ago | 0

Answered
Converting loop to vector operation
I don't think that you can vectorize this. But an acceleration is possible: lastrow = max(find(dataset.price(filteredrows)=...

9 years ago | 0

| accepted

Load more