12 477 total contributions since 2009

It is easier to solve a problem than to guess, what the problem is.

Questions about FileExchange submissions are welcome - get my address from the code. I do not answer mails concerning questions in the forum.

Answered

How to rename all instances of persistent variables?

Simply remove the persistent command temporarily, rename the variable and insert persistent again. You can open the file e.g. ...

How to rename all instances of persistent variables?

Simply remove the persistent command temporarily, rename the variable and insert persistent again. You can open the file e.g. ...

1 jour ago | 0

| accepted

Answered

Delete table from GUI app variable

Perhaps you mean:tcell2{t,s}=final; delete(app.table)

Delete table from GUI app variable

Perhaps you mean:tcell2{t,s}=final; delete(app.table)

1 jour ago | 0

Answered

How to update variable names after a "clear"

Clearing variables is rarely useful in Matlab, but a waste of time only. So on one hand it is not exactly clear, what you are as...

How to update variable names after a "clear"

Clearing variables is rarely useful in Matlab, but a waste of time only. So on one hand it is not exactly clear, what you are as...

1 jour ago | 0

Answered

Variable is not fully defined on some execution paths.

Does this help? tcell2 = cell(10,10); for t = 1:10 for s = 1:10 tcell2{t,s} = imcrop(pic2, ... [(t-...

Variable is not fully defined on some execution paths.

Does this help? tcell2 = cell(10,10); for t = 1:10 for s = 1:10 tcell2{t,s} = imcrop(pic2, ... [(t-...

1 jour ago | 0

Answered

How to select numbers?

F = rand(1,400); M = rand(1,400); Tf = log(-F) / 0.73; Tm = log(-M) / 1.2; It is hard to guess, what this means: "I should...

How to select numbers?

F = rand(1,400); M = rand(1,400); Tf = log(-F) / 0.73; Tm = log(-M) / 1.2; It is hard to guess, what this means: "I should...

1 jour ago | 1

Answered

I can´t save

Some virus scanners limit the write access to the user's Documents folder to block encryption trojans. Check the logs of the vir...

I can´t save

Some virus scanners limit the write access to the user's Documents folder to block encryption trojans. Check the logs of the vir...

1 jour ago | 0

Answered

Replace pixels in a matrix without using histeq

for i = 1:1:r %go through rows for j = 1:1:c %columns img_heq(i, j) = T(img(i,j) + 1); end end

Replace pixels in a matrix without using histeq

for i = 1:1:r %go through rows for j = 1:1:c %columns img_heq(i, j) = T(img(i,j) + 1); end end

1 jour ago | 2

| accepted

Answered

Error using mex: undefined reference for user build package

According to the documentation https://www.mathworks.com/help/matlab/matlab_external/calling-lapack-and-blas-functions-from-mex-...

Error using mex: undefined reference for user build package

According to the documentation https://www.mathworks.com/help/matlab/matlab_external/calling-lapack-and-blas-functions-from-mex-...

1 jour ago | 0

| accepted

Answered

TITLE: How to dynamically determine the name of the variable to be called in the function

I do not get the point. "excel file with data-series in EXACT order of countries (Y_aa Y_bb, Y_cc., i.e.: aa bb cc.." Whe...

TITLE: How to dynamically determine the name of the variable to be called in the function

I do not get the point. "excel file with data-series in EXACT order of countries (Y_aa Y_bb, Y_cc., i.e.: aa bb cc.." Whe...

1 jour ago | 0

Answered

Removing data from a structure that is less than a certain threshold

The iterative growing and shrinking of arrays is extremely expensive. Better: nTraj = numel(AllTraj.Passive); remove = false(...

Removing data from a structure that is less than a certain threshold

The iterative growing and shrinking of arrays is extremely expensive. Better: nTraj = numel(AllTraj.Passive); remove = false(...

2 jours ago | 1

| accepted

Answered

Accessing data within a structure

The chosen data structure demands for loops. There is no "efficient" solution, which extracts the fields in a vectorized way. Yo...

Accessing data within a structure

The chosen data structure demands for loops. There is no "efficient" solution, which extracts the fields in a vectorized way. Yo...

2 jours ago | 0

| accepted

Answered

Acessing imrect with another callback

It is a bad idea to set the AppData of the root object. This has the sme disadvantages as global variables. The complete communi...

Acessing imrect with another callback

It is a bad idea to set the AppData of the root object. This has the sme disadvantages as global variables. The complete communi...

2 jours ago | 0

Answered

why my plot not being displayed?

Try plot(x, y, 'o') to check, if x and/or y are scalars, which plot infinitesimal small dots only.

why my plot not being displayed?

Try plot(x, y, 'o') to check, if x and/or y are scalars, which plot infinitesimal small dots only.

2 jours ago | 0

Answered

Angle between 2 3D straight lines

A = [3,7,9]; B = [4,5,8]; C = [4,5,0]; S1 = B - A; S2 = C - A; Theta = atan2(norm(cross(S1, S2)), dot(S1, S2)); W. Kah...

Angle between 2 3D straight lines

A = [3,7,9]; B = [4,5,8]; C = [4,5,0]; S1 = B - A; S2 = C - A; Theta = atan2(norm(cross(S1, S2)), dot(S1, S2)); W. Kah...

2 jours ago | 1

| accepted

Answered

How to store a variable in a vector?

iVec = 0.001:0.001:0.999999; result = zeros(1, numel(iVec)); for k = 1:numel(iVec) i = iVec(k); ... your code r...

How to store a variable in a vector?

iVec = 0.001:0.001:0.999999; result = zeros(1, numel(iVec)); for k = 1:numel(iVec) i = iVec(k); ... your code r...

3 jours ago | 0

| accepted

Answered

How to optimize the computing process of a matrix ?

Pre-allocate the output of loops. Example: num = zeros; for nn=1:length(Y) NUM = size(Y{1,nn}); num(nn...

How to optimize the computing process of a matrix ?

Pre-allocate the output of loops. Example: num = zeros; for nn=1:length(Y) NUM = size(Y{1,nn}); num(nn...

3 jours ago | 2

Answered

Trying to run a script many times and combine all the results

eList = cell(1, 100); for k = 1:100 callYourScript; eList{k} = e; end A cell array is useful, if the elements, here...

Trying to run a script many times and combine all the results

eList = cell(1, 100); for k = 1:100 callYourScript; eList{k} = e; end A cell array is useful, if the elements, here...

3 jours ago | 0

| accepted

Answered

monte carlo simulation in matlab two dices roll

n = 10; % Number or trials throw = randi(6, n, 2); % Value of throws, 2 dice SumThrow = sum(throw, 2...

monte carlo simulation in matlab two dices roll

n = 10; % Number or trials throw = randi(6, n, 2); % Value of throws, 2 dice SumThrow = sum(throw, 2...

3 jours ago | 0

| accepted

Answered

Euclidean distance of two vectors

Do you know the definition of the Euclidean distance? G = rand(1, 72); G2 = rand(1, 72); D = sqrt(sum((G - G2) .^ 2)); A m...

Euclidean distance of two vectors

Do you know the definition of the Euclidean distance? G = rand(1, 72); G2 = rand(1, 72); D = sqrt(sum((G - G2) .^ 2)); A m...

3 jours ago | 31

| accepted

Answered

Matlab 2015a unable to find C++ compiler in windows10 even after installing microsoft professional C++ 2012. Can anyone help? I initially tried installing SDK7.1 but i was gettting .net framework4 installation errors.

https://www.mathworks.com/matlabcentral/answers/233850-how-can-i-install-sdk-7-1-on-windows-10 https://www.mathworks.com/matlab...

Matlab 2015a unable to find C++ compiler in windows10 even after installing microsoft professional C++ 2012. Can anyone help? I initially tried installing SDK7.1 but i was gettting .net framework4 installation errors.

https://www.mathworks.com/matlabcentral/answers/233850-how-can-i-install-sdk-7-1-on-windows-10 https://www.mathworks.com/matlab...

7 jours ago | 0

Answered

Hi guys. I need help splitting a number into its individual parts and then add them. E.g. the number would be 1994 = 1 + 9 + 9 + 4 = 23

N = 1994; m = floor(log10(N)); D = mod(floor(N ./ 10 .^ (m:-1:0)), 10); >> D = [1, 9, 9, 4]

Hi guys. I need help splitting a number into its individual parts and then add them. E.g. the number would be 1994 = 1 + 9 + 9 + 4 = 23

N = 1994; m = floor(log10(N)); D = mod(floor(N ./ 10 .^ (m:-1:0)), 10); >> D = [1, 9, 9, 4]

7 jours ago | 0

Answered

P files cannot be analyzed to find their dependencies. Please add P file dependencies manually

I'd start with a web search: Ask your favorite search engine for "Matlab get dependencies of P file". You will find e.g.: https...

P files cannot be analyzed to find their dependencies. Please add P file dependencies manually

I'd start with a web search: Ask your favorite search engine for "Matlab get dependencies of P file". You will find e.g.: https...

7 jours ago | 2

| accepted

Answered

Stepping Through Text Documents

See https://www.mathworks.com/matlabcentral/answers/57446-faq-how-can-i-process-a-sequence-of-files A more specific answer is p...

Stepping Through Text Documents

See https://www.mathworks.com/matlabcentral/answers/57446-faq-how-can-i-process-a-sequence-of-files A more specific answer is p...

9 jours ago | 0

Answered

Output argument "px" (and maybe others) not assigned during call to "function1"

If the initial value of varx is smaller than tol already, the body of the while varx>=tol loop is not entered at all. Then e.g. ...

Output argument "px" (and maybe others) not assigned during call to "function1"

If the initial value of varx is smaller than tol already, the body of the while varx>=tol loop is not entered at all. Then e.g. ...

9 jours ago | 0

| accepted

Answered

where is the the porblem in audiowrite?

In the original question you write: AUDIOWRITE('test.wav',s,srate) In the comment you mention: audiowrite('test.wav',s,t) Th...

where is the the porblem in audiowrite?

In the original question you write: AUDIOWRITE('test.wav',s,srate) In the comment you mention: audiowrite('test.wav',s,t) Th...

9 jours ago | 0

Answered

How can I open a file in a compiled application?

The error message is clear in this point: You cannot use open in compiled applications. This is not a limitation by the trial ve...

How can I open a file in a compiled application?

The error message is clear in this point: You cannot use open in compiled applications. This is not a limitation by the trial ve...

9 jours ago | 0

Answered

Permission to write into text file

Do not use 'mojo.txt' as file name without a path. Remember, that any GUI or timer callback could call cd to change the current ...

Permission to write into text file

Do not use 'mojo.txt' as file name without a path. Remember, that any GUI or timer callback could call cd to change the current ...

9 jours ago | 0

| accepted

Answered

I am having this error. Could you help?

The error message is clear: You provide a name, which is not an existing file. What is exactly hidden in the omitted rest of: T...

I am having this error. Could you help?

The error message is clear: You provide a name, which is not an existing file. What is exactly hidden in the omitted rest of: T...

9 jours ago | 0

Answered

How to append cell arrays with a very specific form

Or: C = {... 'Rating1' [] [] [] '8'; ... 'Rating1' [] [] '3' []; ... 'Rating1' '2' [] [] []; ... 'Rating1' [] '4' [...

How to append cell arrays with a very specific form

Or: C = {... 'Rating1' [] [] [] '8'; ... 'Rating1' [] [] '3' []; ... 'Rating1' '2' [] [] []; ... 'Rating1' [] '4' [...

9 jours ago | 0

Answered

Error using mex 'No supported compiler was found' on Mac.

Posting the error message offers new insights. Did you try this already - in a command shell of the operating system: sudo xcod...

Error using mex 'No supported compiler was found' on Mac.

Posting the error message offers new insights. Did you try this already - in a command shell of the operating system: sudo xcod...

9 jours ago | 0