942 total contributions since 2017

Knowledge means knowing where it is written...

Interested in:

- Optimization

- Mathematical Modelling

- Improvement of my programming skills

Answered

ODE45 - Modeling GHR Microspic Car following Model

This code runs, but still has a problem: load mytrafficdata5; basic_ghr(Distance_n,Time_t,Velocity_n) function basic_ghr(Di...

ODE45 - Modeling GHR Microspic Car following Model

This code runs, but still has a problem: load mytrafficdata5; basic_ghr(Distance_n,Time_t,Velocity_n) function basic_ghr(Di...

23 hours ago | 0

Answered

Accessing the Confusion Matrix Data

doc confusionmat confusionmat gives you a matrix, containing all the informations needed - it can be used also as the Normalize...

Accessing the Confusion Matrix Data

doc confusionmat confusionmat gives you a matrix, containing all the informations needed - it can be used also as the Normalize...

2 days ago | 0

| accepted

Answered

Continuous and repetitive gaussian random function in matlab

If i understood you correctly, you want to get the same random values every time you run your code. This is reached by the rng f...

Continuous and repetitive gaussian random function in matlab

If i understood you correctly, you want to get the same random values every time you run your code. This is reached by the rng f...

2 days ago | 0

Answered

random (normal, gaussian series data

If you have Statistics and Machine Learning Toolbox: https://de.mathworks.com/help/stats/makedist.html?s_tid=doc_ta#btstdan-2 ...

random (normal, gaussian series data

If you have Statistics and Machine Learning Toolbox: https://de.mathworks.com/help/stats/makedist.html?s_tid=doc_ta#btstdan-2 ...

2 days ago | 0

Answered

Help with file format conversion please!

% Setup the Import Options and import the data opts = delimitedTextImportOptions("NumVariables", 2); % Specify range and del...

Help with file format conversion please!

% Setup the Import Options and import the data opts = delimitedTextImportOptions("NumVariables", 2); % Specify range and del...

2 days ago | 0

| accepted

Answered

how do I substitute all negative values in a vector with a random number between 0 and 2

y(y<0) = 2*rand(1,numel(y(y<0)))

how do I substitute all negative values in a vector with a random number between 0 and 2

y(y<0) = 2*rand(1,numel(y(y<0)))

2 days ago | 0

Answered

Setting an equation equal to another variable (rearranging) in 2012b

syms s t eq = s == 3*5^(1/2)*t sol_t = solve(eq,t) Beginning from 2017a you can use *isolate*.

Setting an equation equal to another variable (rearranging) in 2012b

syms s t eq = s == 3*5^(1/2)*t sol_t = solve(eq,t) Beginning from 2017a you can use *isolate*.

3 days ago | 1

| accepted

Answered

Hello. Is SimPowerSystem available in Matlab 2019a?

The toolbox was changed and the functions are now available in Simscape Electrical.

Hello. Is SimPowerSystem available in Matlab 2019a?

The toolbox was changed and the functions are now available in Simscape Electrical.

8 days ago | 0

Answered

Hi! How I can download matlab R2010a?

<https://www.mathworks.com/downloads/web_downloads/select_release?mode=gwylf>

Hi! How I can download matlab R2010a?

<https://www.mathworks.com/downloads/web_downloads/select_release?mode=gwylf>

9 days ago | 0

Answered

Saving a graph with edges and nodes

You can not save a workspace object in a *.m-file*. Use a *.mat-file* instead to save your graph. You can load this in other scr...

Saving a graph with edges and nodes

You can not save a workspace object in a *.m-file*. Use a *.mat-file* instead to save your graph. You can load this in other scr...

12 days ago | 0

| accepted

Answered

Where can I study more about scripts in Mat Lab.

you might want to look here: <https://de.mathworks.com/learn/tutorials/matlab-onramp.html?s_cid=learn_ONRAMP_BAN>

Where can I study more about scripts in Mat Lab.

you might want to look here: <https://de.mathworks.com/learn/tutorials/matlab-onramp.html?s_cid=learn_ONRAMP_BAN>

17 days ago | 0

| accepted

Answered

Fit y=m*x into a non lineardata

This forces b to be equal to zero - the value you are interested in is m(1): % Your data x = 0:10; y = [1.5 3 5 7 8 9 13 16 2...

Fit y=m*x into a non lineardata

This forces b to be equal to zero - the value you are interested in is m(1): % Your data x = 0:10; y = [1.5 3 5 7 8 9 13 16 2...

28 days ago | 1

| accepted

Answered

automate the transfer of text files iteraton wise

name = "file_1.txt"; filelist = string(zeros(730,1)); diffusion = cell(730,1); for k = 1:730 number = string(k); f...

automate the transfer of text files iteraton wise

name = "file_1.txt"; filelist = string(zeros(730,1)); diffusion = cell(730,1); for k = 1:730 number = string(k); f...

28 days ago | 1

| accepted

Answered

filter string in the string

str = 'this matlab is a good software, it is a version 9.4 which is equal to 2018a' str = char(str); idx = find((uint8(str)>=...

filter string in the string

str = 'this matlab is a good software, it is a version 9.4 which is equal to 2018a' str = char(str); idx = find((uint8(str)>=...

29 days ago | 1

| accepted

Answered

Reading Data from txt file with a unique FormatSpec

One way: A = reshape(double(replace(string(readcell('Test.txt')),["[[", "[", "]", "]]"],["", "", "", ""])),[],12) This uses th...

Reading Data from txt file with a unique FormatSpec

One way: A = reshape(double(replace(string(readcell('Test.txt')),["[[", "[", "]", "]]"],["", "", "", ""])),[],12) This uses th...

29 days ago | 0

| accepted

Answered

Solving a ODE in matlab

ode = @(t,y) y.^2-y.*0.1*cos(2.*t)-0.2*cos(2.*t); t=[0 8]; y0 = -1; [t,y] = ode45(ode,t,y0); plot(t,y)

Solving a ODE in matlab

ode = @(t,y) y.^2-y.*0.1*cos(2.*t)-0.2*cos(2.*t); t=[0 8]; y0 = -1; [t,y] = ode45(ode,t,y0); plot(t,y)

29 days ago | 2

| accepted

Answered

n x 1 array, add row-wise

https://de.mathworks.com/help/matlab/ref/cumsum.html A = [1 3 4 5 3 8 3]' B = cumsum(A)

n x 1 array, add row-wise

https://de.mathworks.com/help/matlab/ref/cumsum.html A = [1 3 4 5 3 8 3]' B = cumsum(A)

29 days ago | 0

| accepted

Answered

help to convert text file symbol into array

Assuming you import this as a string, you could use: a = "4c07b] IF hit state: 5 (S) valid:" b = char(a) c = b(:) which give...

help to convert text file symbol into array

Assuming you import this as a string, you could use: a = "4c07b] IF hit state: 5 (S) valid:" b = char(a) c = b(:) which give...

30 days ago | 0

| accepted

Answered

Run a code for several values

Sounds like you might be interested in vectorization.

Run a code for several values

Sounds like you might be interested in vectorization.

30 days ago | 0

Answered

write a function that takes any equation as an input

You might to want to achieve this: % Inputs xvals = 0:0.01:10; fun = @(x) x.^5 + sin(x); % call function res = splinecalc...

write a function that takes any equation as an input

You might to want to achieve this: % Inputs xvals = 0:0.01:10; fun = @(x) x.^5 + sin(x); % call function res = splinecalc...

30 days ago | 1

Answered

How to extract specific images from a library of images?

You can construct a string array of the desired file names like follows: exceldata = [0,3,8,12,16,224]; filenames = string(100...

How to extract specific images from a library of images?

You can construct a string array of the desired file names like follows: exceldata = [0,3,8,12,16,224]; filenames = string(100...

30 days ago | 0

| accepted

Answered

Solving a system of second order differential equations (coupled mass-spring system)

syms X1(t) X2(t) K f m1 m2 Y t EqX1 = diff(X1,2) == K*(X1-X2)/m1; EqX2 = diff(X2,2) == f + K*(X2-X1)/m2; [ODE,Vars] = odeTo...

Solving a system of second order differential equations (coupled mass-spring system)

syms X1(t) X2(t) K f m1 m2 Y t EqX1 = diff(X1,2) == K*(X1-X2)/m1; EqX2 = diff(X2,2) == f + K*(X2-X1)/m2; [ODE,Vars] = odeTo...

1 month ago | 0

| accepted

Answered

Why INTLINPROG returns non-integer?

load intlinprogfail.mat % file attached intcon = 1:45; [x, ~, flag] = intlinprog(fdummy, intcon, [], [], Aeq, beq, lb, ub); r...

Why INTLINPROG returns non-integer?

load intlinprogfail.mat % file attached intcon = 1:45; [x, ~, flag] = intlinprog(fdummy, intcon, [], [], Aeq, beq, lb, ub); r...

1 month ago | 1

| accepted

Answered

comparing the two arrays

x1=[1,2,3,2,0,3,4,3,5,4,5,6,8]; x2=[3,0]; res = zeros(1,numel(x2)); for k = 1:numel(x2) res(k) = sum(ismember(x1,x2(k)...

comparing the two arrays

x1=[1,2,3,2,0,3,4,3,5,4,5,6,8]; x2=[3,0]; res = zeros(1,numel(x2)); for k = 1:numel(x2) res(k) = sum(ismember(x1,x2(k)...

1 month ago | 0

| accepted

Answered

matlab code for lagrange method?

Hint: Answers has a search function. We will not write your code - learn from examples: <https://de.mathworks.com/matlabce...

matlab code for lagrange method?

Hint: Answers has a search function. We will not write your code - learn from examples: <https://de.mathworks.com/matlabce...

1 month ago | 0

| accepted

Answered

Selecting data in an array based on a logical value array?

<https://de.mathworks.com/help/matlab/math/array-indexing.html#MatrixIndexingExample-3>

Selecting data in an array based on a logical value array?

<https://de.mathworks.com/help/matlab/math/array-indexing.html#MatrixIndexingExample-3>

1 month ago | 1

| accepted

Answered

Optimization of equation with 3 variables

<https://de.mathworks.com/help/optim/ug/fmincon.html>

Optimization of equation with 3 variables

<https://de.mathworks.com/help/optim/ug/fmincon.html>

1 month ago | 1