12,564 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

Vector between vectors in intervals

Remark: The inputs vectors are not normalized and only almost orthogonal: format long g v1 = [-0.0345; 0.9984; -0.0447] v2 ...

Vector between vectors in intervals

Remark: The inputs vectors are not normalized and only almost orthogonal: format long g v1 = [-0.0345; 0.9984; -0.0447] v2 ...

6 days ago | 0

Answered

Can anyone help me with the "Axis rotation sequence for the Euler angles"

The rotation matrix for the Euler angles in the order XYX is: s1 = sin(alpha); c1 = cos(alpha); s2 = sin(beta); c2 = cos(bet...

Can anyone help me with the "Axis rotation sequence for the Euler angles"

The rotation matrix for the Euler angles in the order XYX is: s1 = sin(alpha); c1 = cos(alpha); s2 = sin(beta); c2 = cos(bet...

11 days ago | 0

Answered

Matlab has encountered an internal problem and needs to close.

The message teels you: If this problem is reproducible, please submit a Service Request via: http://www.mathworks.com/...

Matlab has encountered an internal problem and needs to close.

The message teels you: If this problem is reproducible, please submit a Service Request via: http://www.mathworks.com/...

12 days ago | 0

Answered

Use the time step within ode15s

If the function to be integrated requires the time steps of the solver, something went wrong. I'm convinced that this is a logic...

Use the time step within ode15s

If the function to be integrated requires the time steps of the solver, something went wrong. I'm convinced that this is a logic...

12 days ago | 0

| accepted

Answered

Keep getting error message on my ODE function

u0 = [P0, zeros(1, N + 1)];

Keep getting error message on my ODE function

u0 = [P0, zeros(1, N + 1)];

12 days ago | 0

| accepted

Answered

Eulers method for system of linear equations

h = 0,1; % ^ you mean 0.1 with a dot There is no need to create the accleration as array. Reply a scalar instead: funct...

Eulers method for system of linear equations

h = 0,1; % ^ you mean 0.1 with a dot There is no need to create the accleration as array. Reply a scalar instead: funct...

12 days ago | 0

Answered

Skipping files in a set

What does "files 132, 290, and 404" mean? Are these the indices in rightfiles, or are these parts of the file name? rightfiles=...

Skipping files in a set

What does "files 132, 290, and 404" mean? Are these the indices in rightfiles, or are these parts of the file name? rightfiles=...

12 days ago | 0

Answered

How to sum over indices?

If you assume, that something is wrong, mention, what you observe. This is better than letting the readers guess, what the probl...

How to sum over indices?

If you assume, that something is wrong, mention, what you observe. This is better than letting the readers guess, what the probl...

12 days ago | 1

| accepted

Answered

How can I convert a binary fraction to decimal?

'11001' means: 1*2^0 + 0*2^1 + 0*2^2 + 1*2^3 + 1*2^4 or: [1,1,0,0,1] * 2 .^ (4:-1:0).' (this is what happens inside bin2dec - ...

How can I convert a binary fraction to decimal?

'11001' means: 1*2^0 + 0*2^1 + 0*2^2 + 1*2^3 + 1*2^4 or: [1,1,0,0,1] * 2 .^ (4:-1:0).' (this is what happens inside bin2dec - ...

12 days ago | 3

| accepted

Answered

Table of Matlab release features

%{ Version Release Notes 1 1984 2 1986 3 1987 3.5 1...

Table of Matlab release features

%{ Version Release Notes 1 1984 2 1986 3 1987 3.5 1...

13 days ago | 3

Question

Table of Matlab release features

After reading Rik's comment I looked for a list of Matlab releases and their corresponding features. Wiki: Matlab contains an ex...

13 days ago | 2 answers | 3

Answered

How do I install MinGW for old Matlab R2007?

Matlab R2007 is not supported under Windows 7. MinGW is not supported for Matlab R2007. In consequence the combination of a mode...

How do I install MinGW for old Matlab R2007?

Matlab R2007 is not supported under Windows 7. MinGW is not supported for Matlab R2007. In consequence the combination of a mode...

16 days ago | 0

Answered

How do you form a while function using a function file and then using the function file to form a sequence by performing this operation?

Change n directly and collect the output in the vector v by inserting it at the index end+1: function v = collatz(n) v = n; w...

How do you form a while function using a function file and then using the function file to form a sequence by performing this operation?

Change n directly and collect the output in the vector v by inserting it at the index end+1: function v = collatz(n) v = n; w...

16 days ago | 0

| accepted

Answered

Using parfor in a sparse setting

The help page "Troubleshoot Variables in parfor-Loops" explains the problem: A = [1;2;3;4;nan;nan;nan;nan;nan;10;11]; B = na...

Using parfor in a sparse setting

The help page "Troubleshoot Variables in parfor-Loops" explains the problem: A = [1;2;3;4;nan;nan;nan;nan;nan;10;11]; B = na...

16 days ago | 0

| accepted

Answered

Speed up nested loops

This line is expensive: normal_vector = ((cross(P_all(k-t,:),P_all(k,:)) / ... (norm(cross(P_all(k-t,:),P_all(k,:)))))); ...

Speed up nested loops

This line is expensive: normal_vector = ((cross(P_all(k-t,:),P_all(k,:)) / ... (norm(cross(P_all(k-t,:),P_all(k,:)))))); ...

16 days ago | 0

| accepted

Answered

Does Matlab perform well on AMD Ryzen?

It depends if the used libraries call FMA3 commands. If so, the Ryzen crashes very fast. The performance will depend on your pr...

Does Matlab perform well on AMD Ryzen?

It depends if the used libraries call FMA3 commands. If so, the Ryzen crashes very fast. The performance will depend on your pr...

17 days ago | 0

Answered

Why is my code showing an error? Why is the line deleted?

The shown code does not reproduce the problem. We cannot guess reliably, why one of the obejcts in h is deleted. But a weak gues...

Why is my code showing an error? Why is the line deleted?

The shown code does not reproduce the problem. We cannot guess reliably, why one of the obejcts in h is deleted. But a weak gues...

17 days ago | 0

Answered

variable size matrix and converting letters to numbers

"user enter a variable size matrix": It depends on how you want to implement this: by a GUI, as Matlab code, as text file, in Ex...

variable size matrix and converting letters to numbers

"user enter a variable size matrix": It depends on how you want to implement this: by a GUI, as Matlab code, as text file, in Ex...

18 days ago | 0

| accepted

Answered

Help on understanding the following matlab code ?

Step by step: flipud(xt): This flipps the order of elements vertically. Try it: x = rand(3,2) flipud(x) min(Y, [ ], 2) : fin...

Help on understanding the following matlab code ?

Step by step: flipud(xt): This flipps the order of elements vertically. Try it: x = rand(3,2) flipud(x) min(Y, [ ], 2) : fin...

18 days ago | 0

Answered

Resuming from "keyboard" command?

Using debug commands for an interaction with the user is a really bad design. A dynamic modification of the workspace is very fr...

Resuming from "keyboard" command?

Using debug commands for an interaction with the user is a really bad design. A dynamic modification of the workspace is very fr...

18 days ago | 0

Answered

Memory usage very high

How do you observe the memory consumption? The Taskmanager displays the memory reserved for Matlab. If Matlab allocates memory a...

Memory usage very high

How do you observe the memory consumption? The Taskmanager displays the memory reserved for Matlab. If Matlab allocates memory a...

18 days ago | 0

Answered

Return vectors from for loop as columns in matrix

Start with cleaning up the code. The lines Dplus; and Dminus; do nothing, so they are wasting time only and confuse the readers...

Return vectors from for loop as columns in matrix

Start with cleaning up the code. The lines Dplus; and Dminus; do nothing, so they are wasting time only and confuse the readers...

18 days ago | 1

Answered

convert lower case to upper and upper to lower

You can use the function isstrprop with the category 'lower' and 'upper' to identify the specific characters. Then use the comma...

convert lower case to upper and upper to lower

You can use the function isstrprop with the category 'lower' and 'upper' to identify the specific characters. Then use the comma...

18 days ago | 0

Answered

Function run(scriptname) doesn't work.

Store the M-files in a folder, in which you have full access. C:\Users\ is a bad idea. Create a folder somewhere else, e.g. insi...

Function run(scriptname) doesn't work.

Store the M-files in a folder, in which you have full access. C:\Users\ is a bad idea. Create a folder somewhere else, e.g. insi...

18 days ago | 0

Answered

Subtracting Vector from a Matrix

Matlab can subtract vectors from matrices automatically since R2016b - so called "auto expanding". Do you use an older version? ...

Subtracting Vector from a Matrix

Matlab can subtract vectors from matrices automatically since R2016b - so called "auto expanding". Do you use an older version? ...

18 days ago | 0

| accepted

Answered

Include global variable declaration infunctions

Global variables are a shot in your knee in every case. Hiding them in scripts, which are called dynamically, impedes the debugg...

Include global variable declaration infunctions

Global variables are a shot in your knee in every case. Hiding them in scripts, which are called dynamically, impedes the debugg...

19 days ago | 0

Answered

deleted old version of Matlab (R2017b) keeps getting back

See https://nektony.com/how-to/uninstall-matlab-mac According to https://www.mathworks.com/help/install/ug/uninstall-mathworks-...

deleted old version of Matlab (R2017b) keeps getting back

See https://nektony.com/how-to/uninstall-matlab-mac According to https://www.mathworks.com/help/install/ug/uninstall-mathworks-...

19 days ago | 1

| accepted

Answered

I found this bellow code in internet. While I run the code I noticed following errors.

This is a strange and inefficient code. Replace e.g. for i=1:len for j= 2:2 text_names(i,j)=txt(i,j); end ...

I found this bellow code in internet. While I run the code I noticed following errors.

This is a strange and inefficient code. Replace e.g. for i=1:len for j= 2:2 text_names(i,j)=txt(i,j); end ...

19 days ago | 0

Answered

Vectorise or Parallel Computing

This loop cannot be parallelized. If flux_edge is a vector and not a matrix, accumarray would solve the problem efficiently. Try...

Vectorise or Parallel Computing

This loop cannot be parallelized. If flux_edge is a vector and not a matrix, accumarray would solve the problem efficiently. Try...

19 days ago | 0

| accepted

Answered

How do I return an extra parameter using Matlab's ODE solvers?

If the problems mentioned in my comment are fixed, the solution is easy: Run the integration at first. Then provide the calcualt...

How do I return an extra parameter using Matlab's ODE solvers?

If the problems mentioned in my comment are fixed, the solution is easy: Run the integration at first. Then provide the calcualt...

19 days ago | 0

| accepted