Answered
Selecting Files Within Subfolders
Instead of using |cd| to modify the current folder, it is safer to use absolute paths: for k = 1:10 Folder = sprintf('...

8 years ago | 0

Answered
Not Enough Input Arguments
T = [0.5 0.5 1 1 5 5 10]; d = [0.1 0.1 0.5 0.5 5 10 50]; L = dispersion(T,d) function L = dispersion(T,d) L = 9....

8 years ago | 0

Answered
Pairwise comparison between four vectors
Vector1 = [0,1,2,5,6,8] Vector2 = [0,3,4,5,6,7] Vector3 = [0,1,2,3,6,8,3,2,4,5,6,8] Vector4 = [0,3,4,5,6,7,8,3,5,6,7,...

8 years ago | 1

| accepted

Answered
Matlab crash after accidently assigning a counter variable from a loop as output argument of a function?
As far as I understand, shadowing the built-in function |feature| has severe effects already. E.g. even the startup of Matlab ca...

8 years ago | 1

Answered
How to create an array with the same letter but different number
Len = 43; V = sprintfc('X%d', 1:Len); Or with modern Matlab versions: V = compose('X%d', 1:Len); Then: ti...

8 years ago | 0

| accepted

Answered
find a same element inside a cell
C = {[1,2,5],[2,3,4],[1,2,4,5],[4,7,9], ... [1,2,4,5,6,9,10,11],[6,12,13],[1,2,4,5,6,9,13,14]}; keep = false(1, num...

8 years ago | 1

| accepted

Answered
arrange file length matlab
Maybe: for k = 1:numfiles File = sprintf('a%d.wav', k); [signal, myfs{k}] = audioread(File); if size(sign...

8 years ago | 0

| accepted

Answered
undefined function or variable workspacefunc
Did you read and consider the error message? Warning: MATLAB did not appear to successfully set the search path. To recover ...

8 years ago | 1

Answered
Starts after a bit string
bit = [1 1 1 1 1 1 0 1 0 1 0 1 0]; if length(bit) >= 7 && isequal(bit(1:7), [1 1 1 1 1 1 0]) signal = bit(8:end); ...

8 years ago | 0

Answered
find maximum value of column when row is known and value of Array is non zero?
Maybe you want: A = [51 2 3 nan; 4 5 6 7; 42 16 45 63; NaN 2 56 12; NaN 45 26 32]; ind...

8 years ago | 2

| accepted

Answered
More efficient way to insert a push button in a figure and run a function or a command.
What about using the Callback instead of the ButtonDownFcn? function Plot_with_ginput_buttonfn( x,y ) figure plot(x...

8 years ago | 1

| accepted

Answered
Does anyone know an easy way to extract a certain row of information within a multiple file ?
See <https://www.mathworks.com/matlabcentral/answers/57446-faq-how-can-i-process-a-sequence-of-files FAQ: Process sequence of fi...

8 years ago | 0

Answered
avilableFcn = {@resultCallback, stim, targetNoNull}
It depends on where the function is stored. Is it an extra M-file or contained in the M-file created by GUIDE? Usually you do no...

8 years ago | 0

Answered
Unable to load file using relative path
It is a mess to add folders to Matlab's |path| only to import a file. There is no need to do so, but you might include unexpecte...

8 years ago | 1

Answered
GUI problem on showing a text that suit with the size of edit text area
See <https://www.mathworks.com/help/matlab/ref/textwrap.html doc textwrap> (link).

8 years ago | 0

| accepted

Answered
Getting Coordinate input from user
According to the documentation, |input< has 1 output only: help input doc input Then: x = zeros(1, 5); % Pre-al...

8 years ago | 0

| accepted

Answered
How to detect given pattern and delete the current row
C = {'Strucked', 'Atomatic', 23; ... 'Passed', 'Mannual', 41; ... 'Passed', 'Automatic', 1; ... ...

8 years ago | 1

| accepted

Answered
Convert this C program into a Matlab program.
ex = [lx; mx; nx] / J; N = rand(3, 1); % ??? N_matrix = zeros(9, 27); N_matrix(1, 1:9) = repmat(N, 3, 1) .* repelem...

8 years ago | 1

Answered
How to parallel two outer loops of a multiple for loop?
Here a version of your code with some removed parentheses and a |rand| instead of a |load| (because I do not have the required M...

8 years ago | 0

| accepted

Answered
Solving matrix with values spanning orders of magnitudes
No. If the condition is near to |eps| (in your case it seems to be exactly |eps|), the matrix cannot be inverted in a stable way...

8 years ago | 0

| accepted

Answered
Index exceeds array bounds
If |Eq| is a scalar, a 1x1 array, than the only working value of |Sol(2,i)| is |1|. Otherwise |Eq(Sol(2,i))| must fail, of cours...

8 years ago | 0

Answered
How do I define MAIN as Master script?
Instead of switching scripts, use functions with defined inputs and outputs. Searching for tricks to handle scripts more dynamic...

8 years ago | 0

Answered
Call activex methods in guide
Use the debugger to find out, what |handles| is. dbstop if error Run the code again until Matlab stops. Then check, what...

8 years ago | 0

Answered
Unix-time-line, start with zero for plotting
Do you mean: unixtime = [1.537602860041000e+12; 1.537602860561000e+12; 1.537602861081000e+12] utime0 = unixtime - unix...

8 years ago | 0

| accepted

Answered
Find a specific data set in a matrix
Maybe you mean: A = [1 3 4 7 10 3 7 9 19 10 1 5 8 3 7]; P = [3, 7]; index = strfind(A, P) In opposite to the name,...

8 years ago | 0

| accepted

Answered
MATLAB Compiler how to use functions in single directory?
Overloading the built-in function |run| is a bad idea and might cause problems, if you work with scripts. Selecting functions by...

8 years ago | 0

Answered
How to write the MatLab code for the bisection method if we use |p(i)−p(i−1)|<ξ as a stopping criteria?
So just remember the former value of |p| and compare the changes equivalently to measuring the distance between a and b: .....

8 years ago | 0

| accepted

Answered
Inner Matrix Dimension must agree
It is not clear what you want to achieve. C1 = 0.09 * (L2 / 0.115); % More efficient: (0.09 / 0.115) * L2 C2 = B.^4 /...

8 years ago | 0

Answered
How can i do this "Bisection"?
Your function should reply |xc|: function xc = bisect(y,xl,xu) % By the way: No semicolon needed here I guess that th...

8 years ago | 0

Load more