Answered
Strange behavior of the editor in the forum
5 months later: Since about a week, at about every 5th or 8th time pressing Ctrl-E my Firefox decides to switch to the first ta...

7 years ago | 1

Answered
How do I post a picture with my question
The question of how to embed a picture was answered already. Let me encourage all users to really use this feature, which is muc...

7 years ago | 1

| accepted

Answered
How can i define variables in gui?
It depends on what "use "audiofile" in math operators" mean. After your code, audiofile is a variable, which contains the signal...

7 years ago | 0

| accepted

Answered
How do I add a column to a cell array based on existing values in another column?
Only a beginner so forgive me for the basic question... but I have a cell array (x) of dimensions 1310x2. Column 1 is a unique i...

7 years ago | 2

Answered
I want to store all the outputs in a single matrix and also i want to select all the combination for which c has minimum and maximum value.
result = zeros(5 * 4 * 20, 3); % Pre-allocate with maximum size count = 0; for a = 1:5 for b = 5:8 for c = 1:2...

7 years ago | 0

Answered
How to multiplay matrices in different dimensions?
Perhaps: a = rand(2,2,3); b = [2, 2; 4, 4] % Elementwise - auto-expanding since R2016b: r = a .* b % Matrix multiplicat...

7 years ago | 1

| accepted

Answered
Reading a txt file
S = fileread('filename'); C = strsplit(S, char(10)); C(strncmp(C, '$'), 1) = []; C(strncmp(C, '#'), 1) = []; C = strtok(C,...

7 years ago | 1

Answered
How do I listen for when new axes are added to a figure?
What about: figure('DefaultAxesCreateFcn', 'disp(''hello'')'); subplot(1,2,1) subplot(1,2,2) To my surprise this shows 4 h...

7 years ago | 0

| accepted

Answered
Why does this code output all values as 1?
elseif r1<=r(i)<=r2 This will not do, what you expect. Matlab processes the expression from left to right. The first part is: ...

7 years ago | 0

| accepted

Answered
Copy the values of multiple fields in a structure to another structure at once
Maybe you mean: A.SM = []; p = repmat(A, 3, 1); B.SM = 1:5; p2 = repmat(B, 3, 1); [p.SM] = deal(p2.SM) Or with a lo...

7 years ago | 0

Answered
Why is my modified path not saved in MATLAB?
It is safer to work without admin privileges to avoid an accidental modification of Matlab's toolbox functions. A drawback is, t...

7 years ago | 5

Answered
Very slow loop trying to find any intersection
A simplified version to get the overview: dy = jaccard_dyadic; in = assignee_inventors; n = find(dy(:,1) == 0, 1, 'first') -...

7 years ago | 1

Answered
my scripts won't update.
Are you sure that you edit the function which you run? Or do you have different versions of the function in different folders, a...

7 years ago | 1

| accepted

Answered
Most efficient method to search through file names?
Folder = 'D:\Your\Folder'; FileList = dir(fullfile(Folder, '*.*')); NameList = {FileList.name}; % NameList = {'SSSTTTT0617'...

7 years ago | 2

Answered
excel array write error.
I've formatted your code today. Please do this by your own using the menu over the sectin for editing the message. I've mention...

7 years ago | 0

| accepted

Answered
Set the color of the axes per default to black (instead of dark gray)?
I'd try it with: set(groot, 'DefaultAxesXColor', [0,0,0], ... 'DefaultAxesYColor', [0,0,0], ... 'Defaul...

7 years ago | 2

Answered
How can I vectorize two nested loops with different dimensions?
The first loop looks strange, because the body does not depend on the loop counter i. Currently this should produce the same out...

7 years ago | 1

| accepted

Answered
duplicated result in for loop
The body of the loop does not depend on the loop counter lol. Therefore you must get the same value for each iteration. A bold ...

7 years ago | 0

| accepted

Answered
print on the bottom line
You have 2 for i loops. Omit the inner one, because it overwrite all formerly existing values and repeats them 5 times. h = zer...

7 years ago | 0

| accepted

Answered
how to create loops to automatically select next bits??
a = randi([0,1], 1, 80); for k = 1:16:80 b = a(k:k+15); ... end Or: aa = reshape(a, 16, 5); for k = 1:5 b = ...

7 years ago | 0

Answered
"insfilter" inbuilt function error in Matlab 2018b
Use the local documentation of your Matlab installation to find out, which features are available. Using examples from another M...

7 years ago | 0

| accepted

Answered
Problem of using "assignin" during figure callbacks
Exactly: Callbacks are called from the base workspace. "how could I get a output after the figure deleted in the subfunction wo...

7 years ago | 0

Answered
How can I plot multiple lines with a slightly different shade of the same color?
startColor = [0.5, 0.5, 0.5]; for ii = 1:20 plot(time, freqlist{ii}, 'Color', startColor + (ii-1) / 40); hold on; en...

7 years ago | 0

| accepted

Answered
how to implement structfun using 2 variables
This seems to be much easier: field = 'value1'; output1 = S.(field).x output1 = S1.(field).x structfun iterates over the f...

7 years ago | 1

Answered
Why doesn't atan2 (u,v) give me the right angle of two simple vectors?
Of course this code replies 0. If one of the vectors is the Null vector, there cannot be an angle different from 0. So the only...

7 years ago | 1

| accepted

Answered
Invalid MEX-file: The specified module could not be found. For PolygonClip.mexw64
The DependencyWalker sounds like the best option to solve the problem. Of course you get the same dependencies for the same file...

7 years ago | 0

Answered
Stop All Functions in Stack if First One is Stopped
I cannot really follow the explanations. E.g. "The button updates specific info in the function, and then loads the function fro...

7 years ago | 0

Answered
How to transfer folder structure to struct data?
It does not sound like a good design to use the folder names as field names. Keeping the names in a cell string might be smarter...

7 years ago | 0

| accepted

Answered
Weird errors with functions and while loops
Please post the original error messages instead of only a rephrased part of it. "My while loop is giving me an error, saying th...

7 years ago | 0

Answered
Find all lines of a matrix which have a matching pair of values
Sort the input array to avoid some overhead in intersect: A = [1 2 3 4; 2 5 7 8; 4 5 7 9; 4 6 7 13; ...

7 years ago | 1

Load more