10,688 total contributions since 2009

Computers assist human, not the other way around.

Professional Interests: Motion analysis, physics, orthopedics

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

Answered

import problem with CSV file

The "ï»¿" is a "BOM", a Byte Order Mark. This is required for UTF files. When I open the attached file, I do not see such a BOM ...

import problem with CSV file

The "ï»¿" is a "BOM", a Byte Order Mark. This is required for UTF files. When I open the attached file, I do not see such a BOM ...

2 days ago | 0

Answered

How to remove single quotes

The quotes are most likes not included in the data, but inserted only for displaying the data in the command window. Unfortunate...

How to remove single quotes

The quotes are most likes not included in the data, but inserted only for displaying the data in the command window. Unfortunate...

2 days ago | 0

Answered

How can i open dataset in matlab which is .pkl format?

Did you take the time to search in the net before asking? * <https://xcorr.net/2013/06/12/load-pickle-files-in-matlab/> * <h...

How can i open dataset in matlab which is .pkl format?

Did you take the time to search in the net before asking? * <https://xcorr.net/2013/06/12/load-pickle-files-in-matlab/> * <h...

2 days ago | 0

Answered

Coupled ODE error- too many inputs

Try it with an explicit instead of an anonymous function: function dy = fcn(t, y) g=9.8; l1=1; l2=1; m1=1; m2=1; dy =...

Coupled ODE error- too many inputs

Try it with an explicit instead of an anonymous function: function dy = fcn(t, y) g=9.8; l1=1; l2=1; m1=1; m2=1; dy =...

2 days ago | 0

| accepted

Answered

how to read .std files in matlab otherthan import data

It depends on how you want to parse the contents of the file. Maybe all you need is str = fileread(FileName);

how to read .std files in matlab otherthan import data

It depends on how you want to parse the contents of the file. Maybe all you need is str = fileread(FileName);

2 days ago | 0

Answered

Closing an .exe application

Do you mean: system('TASKKILL -f -im "Windows Command Processor.exe"'); ? The "/?" is not useful here. Do you really ...

Closing an .exe application

Do you mean: system('TASKKILL -f -im "Windows Command Processor.exe"'); ? The "/?" is not useful here. Do you really ...

2 days ago | 0

Answered

Speed up indexing without using a loop

Maybe logical indexing is faster: N; % given nx1 matrix with some values D = inf(n,1); D(1,1) = 0; M = false(n,1);...

Speed up indexing without using a loop

Maybe logical indexing is faster: N; % given nx1 matrix with some values D = inf(n,1); D(1,1) = 0; M = false(n,1);...

2 days ago | 1

| accepted

Answered

how can i get Matlab for my window 7 32 bit os?

The last version of Matlab which runs under a 32 bit system is R2015b. You can buy a current version of Matlab and download the ...

how can i get Matlab for my window 7 32 bit os?

The last version of Matlab which runs under a 32 bit system is R2015b. You can buy a current version of Matlab and download the ...

2 days ago | 0

| accepted

Answered

ODE15s time vector size

A |tspan| with 3 values has exactly the same physical meaning as with 2 values: tspan1 = [t1, t3] tspan2 = [t1, t2, t3] ...

ODE15s time vector size

A |tspan| with 3 values has exactly the same physical meaning as with 2 values: tspan1 = [t1, t3] tspan2 = [t1, t2, t3] ...

3 days ago | 0

| accepted

Answered

Bar Graph Patterns instead of Colors

I did not try it, but maybe <https://www.mathworks.com/matlabcentral/fileexchange/24021-hatch-fill-patterns-plus-color---invert>...

Bar Graph Patterns instead of Colors

I did not try it, but maybe <https://www.mathworks.com/matlabcentral/fileexchange/24021-hatch-fill-patterns-plus-color---invert>...

3 days ago | 0

Answered

Using datetime data for x axis, I have an area plot on the whole x axis and I create a fill area for [x1 x2] to highlight a specific part of the graph. Fill created is over area plot and modifies its color. So how can I have fill plot in background?

Either draw the |fill| object at first: fill([x1 x1 x2 x2], y1, '', ... 'LineStyle','none','FaceColor','y','FaceAlp...

Using datetime data for x axis, I have an area plot on the whole x axis and I create a fill area for [x1 x2] to highlight a specific part of the graph. Fill created is over area plot and modifies its color. So how can I have fill plot in background?

Either draw the |fill| object at first: fill([x1 x1 x2 x2], y1, '', ... 'LineStyle','none','FaceColor','y','FaceAlp...

3 days ago | 0

| accepted

Answered

I want to save multiple images in a folder?

See <https://www.mathworks.com/matlabcentral/answers/57446-faq-how-can-i-process-a-sequence-of-files> for k = 1:5 File...

I want to save multiple images in a folder?

See <https://www.mathworks.com/matlabcentral/answers/57446-faq-how-can-i-process-a-sequence-of-files> for k = 1:5 File...

3 days ago | 0

Answered

I am getting more time complexity for the below code can you

Some amrginal ideas only: Replace your |euclideanDistance()| call by: sqrt(sum((A(:) - B(:)).^2)) Move the |drawnow| ...

I am getting more time complexity for the below code can you

Some amrginal ideas only: Replace your |euclideanDistance()| call by: sqrt(sum((A(:) - B(:)).^2)) Move the |drawnow| ...

5 days ago | 0

Answered

cell matrix: code does not work.. can somebody help?

Try to replace zyklen{i,j,k} = num2cell(a(frames(l,j):frames(l,j+1), k)); by zyklen{i,j,k} = a(frames(l,j):frames(l...

cell matrix: code does not work.. can somebody help?

Try to replace zyklen{i,j,k} = num2cell(a(frames(l,j):frames(l,j+1), k)); by zyklen{i,j,k} = a(frames(l,j):frames(l...

7 days ago | 0

Answered

Turn imported column data into matrices

Data = load('q3_data.mat'); Outcome = Data.X(1, :); Variables = Data.X(2:end, :); Here I guess, that the data ...

Turn imported column data into matrices

Data = load('q3_data.mat'); Outcome = Data.X(1, :); Variables = Data.X(2:end, :); Here I guess, that the data ...

7 days ago | 0

Answered

MATLAB r2016b problem with cvsread

The documentation of |csvread| explains clearly: The file can only contain numeric values. 'null' is not a numeric value....

MATLAB r2016b problem with cvsread

The documentation of |csvread| explains clearly: The file can only contain numeric values. 'null' is not a numeric value....

7 days ago | 0

Answered

How to access a website, fill up username and password, click in submit and get the html code of the page loaded?

You can start an external browser and use <https://www.mathworks.com/matlabcentral/fileexchange/40001-keyinject FEX: keyinject> ...

How to access a website, fill up username and password, click in submit and get the html code of the page loaded?

You can start an external browser and use <https://www.mathworks.com/matlabcentral/fileexchange/40001-keyinject FEX: keyinject> ...

7 days ago | 0

Answered

fast sum 3D matrix, Mex file

The job should be done very efficiently by Matlab already: pix = sum(A, 3); The C code looks okay, but maybe it is simpl...

fast sum 3D matrix, Mex file

The job should be done very efficiently by Matlab already: pix = sum(A, 3); The C code looks okay, but maybe it is simpl...

7 days ago | 0

| accepted

Answered

How to recalculate cell content in gui table using other cell content of the same table just like excell?

The error message is clear already: The variable |olddata| is a cell array, but you can apply the addition to numerical data onl...

How to recalculate cell content in gui table using other cell content of the same table just like excell?

The error message is clear already: The variable |olddata| is a cell array, but you can apply the addition to numerical data onl...

7 days ago | 0

Answered

How to display my result in different script?

Simply add this line on top function [Ls,N,Dt,Z,HETP,dp_total] = YourFunctionName and this at the bottom: end an...

How to display my result in different script?

Simply add this line on top function [Ls,N,Dt,Z,HETP,dp_total] = YourFunctionName and this at the bottom: end an...

7 days ago | 0

| accepted

Answered

How do I call out a specific column in a matrix?

With some guessing: Z1 = all(B(:,1:3) | (B(:,1:2) & B(:,4)), 2); In the part |B(:,1:2) & B(:,4)| you try to apply the ...

How do I call out a specific column in a matrix?

With some guessing: Z1 = all(B(:,1:3) | (B(:,1:2) & B(:,4)), 2); In the part |B(:,1:2) & B(:,4)| you try to apply the ...

7 days ago | 0

Answered

Use string to define path for uigetfile

There are two methods: % Folder is not a cell string and not the name "pwd": Folder = 'C:\Users\xxx\Documents\DTU\SAXS\f...

Use string to define path for uigetfile

There are two methods: % Folder is not a cell string and not the name "pwd": Folder = 'C:\Users\xxx\Documents\DTU\SAXS\f...

7 days ago | 0

| accepted

Answered

How to store the values which satisfy the and operation ?

allV <= 60.62 & allV <= 0 This is not useful, because it is the same as allV <= 0 I guess, you want the two columns...

How to store the values which satisfy the and operation ?

allV <= 60.62 & allV <= 0 This is not useful, because it is the same as allV <= 0 I guess, you want the two columns...

7 days ago | 0

Answered

Why do I get an error?

Instead of a bunch of |if| statements with |strcmp|, you can use |switch| also: switch object case 'metal' OB =...

Why do I get an error?

Instead of a bunch of |if| statements with |strcmp|, you can use |switch| also: switch object case 'metal' OB =...

8 days ago | 0

| accepted

Answered

Rotate 1 by N vector

See <https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle WikiPedia: Rotation_matrix_from_axis_and_...

Rotate 1 by N vector

See <https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle WikiPedia: Rotation_matrix_from_axis_and_...

8 days ago | 1

Answered

How to find minimal distance between elements?

n = 10; v = rand(1, n); dist = abs(v - v.'); % Auto-expand since R2016b dist(1:(n+1):end)...

How to find minimal distance between elements?

n = 10; v = rand(1, n); dist = abs(v - v.'); % Auto-expand since R2016b dist(1:(n+1):end)...

8 days ago | 0

Answered

Subplot graphs that I saved in a line

I still do not get it. Perhaps you mean: Fig1H = figure; Fig2H = figure; suplot(1,2,1, 'Parent', Fig1H); plot(1...

Subplot graphs that I saved in a line

I still do not get it. Perhaps you mean: Fig1H = figure; Fig2H = figure; suplot(1,2,1, 'Parent', Fig1H); plot(1...

8 days ago | 0

Answered

How to find minimal distance during locomotion

I'm not sure, what you are asking for. So just a guess: function d = distini(x,X,y,Y) d = zeros(numel(X), numel(x)); ...

How to find minimal distance during locomotion

I'm not sure, what you are asking for. So just a guess: function d = distini(x,X,y,Y) d = zeros(numel(X), numel(x)); ...

8 days ago | 0

Answered

I cannot browse my own images into a GUI created by somebody else?

Error while evaluating UIControl Callback. This is not a clear message. It would be required to find out, what the error is....

I cannot browse my own images into a GUI created by somebody else?

Error while evaluating UIControl Callback. This is not a clear message. It would be required to find out, what the error is....

8 days ago | 0

| accepted