Knowledge means knowing where it is written...

Interested in:

- Optimization

- Mathematical Modelling

- Improvement of my programming skills

Answered

Subscript in figure WHAT AM I DOING WRONG?

<https://de.mathworks.com/matlabcentral/answers/157122-latex-interpreter-mean-bar-with-subscripts>

Subscript in figure WHAT AM I DOING WRONG?

<https://de.mathworks.com/matlabcentral/answers/157122-latex-interpreter-mean-bar-with-subscripts>

10 hours ago | 0

Answered

How get the Adjacency matrix from complete graph

Its trivial: A = ones(n) - diag(diag(ones(n))) or, more easy A = ones(n) - eye(n)

How get the Adjacency matrix from complete graph

Its trivial: A = ones(n) - diag(diag(ones(n))) or, more easy A = ones(n) - eye(n)

18 hours ago | 0

| accepted

Answered

basic error, help me

2 closing brackets missing, one '*' operator missing, one times use './' instead of '/': x = linspace(20,100000); y = 20*log1...

basic error, help me

2 closing brackets missing, one '*' operator missing, one times use './' instead of '/': x = linspace(20,100000); y = 20*log1...

22 hours ago | 0

| accepted

Answered

Splitting an array up

use this before reshaping - it discards all data, you dont care about: x = x(:,1:40*2048)

Splitting an array up

use this before reshaping - it discards all data, you dont care about: x = x(:,1:40*2048)

1 day ago | 0

| accepted

Answered

How do I simplify the values of a function?

Can be done with symbolic toolbox - matlabFunction returns an anonymous function the way you want: syms x % known constants a...

How do I simplify the values of a function?

Can be done with symbolic toolbox - matlabFunction returns an anonymous function the way you want: syms x % known constants a...

1 day ago | 0

Answered

how can I write more than 1 objective in linprog line

You can not do this in linprog. See here instead: https://de.mathworks.com/help/optim/multiobjective-optimization.html If you ...

how can I write more than 1 objective in linprog line

You can not do this in linprog. See here instead: https://de.mathworks.com/help/optim/multiobjective-optimization.html If you ...

2 days ago | 0

Answered

How to permute binary numbers to a specific permutation

https://de.mathworks.com/help/matlab/ref/circshift.html F=[0 6 2 5 4 3 6 1]' A = dec2bin(F) B = circshift(A,1,2) gives: F =...

How to permute binary numbers to a specific permutation

https://de.mathworks.com/help/matlab/ref/circshift.html F=[0 6 2 5 4 3 6 1]' A = dec2bin(F) B = circshift(A,1,2) gives: F =...

3 days ago | 0

| accepted

Answered

I need help fixing an error that pops up when running my code. "Undefined function or variable 't'.

Seee the code below: % [Car B] is traveling a distance d ahead of [Car A]. Both cars are traveling % at the same initial veloc...

I need help fixing an error that pops up when running my code. "Undefined function or variable 't'.

Seee the code below: % [Car B] is traveling a distance d ahead of [Car A]. Both cars are traveling % at the same initial veloc...

3 days ago | 0

Answered

How to Create an Anonymous Function?

Try to write it in one line - i guess you use an older release of Matlab, that does not support the semicolon operator in a seco...

How to Create an Anonymous Function?

Try to write it in one line - i guess you use an older release of Matlab, that does not support the semicolon operator in a seco...

3 days ago | 0

Answered

Solving nonlinear second order diferential equation

%% Dados iniciais clear Massa_foguete_seco = 3000; % Kg Massa_combustivel_inicial = 3000; % kg Empuxo ...

Solving nonlinear second order diferential equation

%% Dados iniciais clear Massa_foguete_seco = 3000; % Kg Massa_combustivel_inicial = 3000; % kg Empuxo ...

6 days ago | 0

Answered

2D Histogram aus 2 Matrizen

Immer dann, wenn in A oder B eine 0 vorkommt, wird g_a oder eben g_b gleich Null. Wenn dann im nächsen Schritt versucht wird, H_...

2D Histogram aus 2 Matrizen

Immer dann, wenn in A oder B eine 0 vorkommt, wird g_a oder eben g_b gleich Null. Wenn dann im nächsen Schritt versucht wird, H_...

6 days ago | 0

| accepted

Answered

population size of pso in matlab

You find it here: https://de.mathworks.com/help/gads/particleswarm.html?s_tid=srchtitle#budidgf-options The entry is in the th...

population size of pso in matlab

You find it here: https://de.mathworks.com/help/gads/particleswarm.html?s_tid=srchtitle#budidgf-options The entry is in the th...

6 days ago | 0

| accepted

Answered

Storing values in a matrix

% Constants m=15; l=2; g=9.81; d=l/2; Io=(1/3)*m*(l^2); wn=sqrt((m*g*d)/Io); % function handle for linearized ode Vib_...

Storing values in a matrix

% Constants m=15; l=2; g=9.81; d=l/2; Io=(1/3)*m*(l^2); wn=sqrt((m*g*d)/Io); % function handle for linearized ode Vib_...

6 days ago | 0

Answered

ODE solvers - passing parameters

<https://de.mathworks.com/help/optim/ug/passing-extra-parameters.html>

ODE solvers - passing parameters

<https://de.mathworks.com/help/optim/ug/passing-extra-parameters.html>

1 month ago | 0

Answered

Matlab code for solving the following system equation

>> A = [2 1 5; 2 2 3; 1 3 3] A = 2 1 5 2 2 3 1 3 3 >> b = [5; 7; 6] b = ...

Matlab code for solving the following system equation

>> A = [2 1 5; 2 2 3; 1 3 3] A = 2 1 5 2 2 3 1 3 3 >> b = [5; 7; 6] b = ...

1 month ago | 0

Answered

How to solve a LPP when the A of linprog does not form a square matrix? I have 5 variables and 2 constraints.

% define all constraints A = [2, 2, 2, 0.6, 0.3; 0 0.04, 0.08, 0.09, 0.135; -eye(5)] b = [750, 30.75, zeros(1,5)] ...

How to solve a LPP when the A of linprog does not form a square matrix? I have 5 variables and 2 constraints.

% define all constraints A = [2, 2, 2, 0.6, 0.3; 0 0.04, 0.08, 0.09, 0.135; -eye(5)] b = [750, 30.75, zeros(1,5)] ...

1 month ago | 0

Answered

How to multiply three scalar value one by one to other five scalar value and get all the results in Simulink

[1 2 3] .* [3 5 7 9]'

How to multiply three scalar value one by one to other five scalar value and get all the results in Simulink

[1 2 3] .* [3 5 7 9]'

1 month ago | 0

Answered

Solving Integral via MATLAB!!

syms a b z eq = (a-z) / ((1+z)*(b+z)); pretty(eq) sol = int(eq,z); pretty(sol)

Solving Integral via MATLAB!!

syms a b z eq = (a-z) / ((1+z)*(b+z)); pretty(eq) sol = int(eq,z); pretty(sol)

1 month ago | 0

Answered

I can not plot values

syms Frx B m V1 V2 P1g P2g Frz alfa1 A1 V M Degree Fr W Weight m1=18;B1=1;P1g=0;V1=250;A1=1;alfa1=0; m2=m1;B2=B1;P2g=0;V2=250;...

I can not plot values

syms Frx B m V1 V2 P1g P2g Frz alfa1 A1 V M Degree Fr W Weight m1=18;B1=1;P1g=0;V1=250;A1=1;alfa1=0; m2=m1;B2=B1;P2g=0;V2=250;...

1 month ago | 0

| accepted

Answered

Reinforcement Learning toolbox step function

The action the agent has choosen in the last step, usually has an impact on the environment. To let the step function know what ...

Reinforcement Learning toolbox step function

The action the agent has choosen in the last step, usually has an impact on the environment. To let the step function know what ...

1 month ago | 0

| accepted

Answered

Why is this break not executing for the summation of pi

You never reach the value of your ratio of PrevSum/pie. I inserted 2 lines, the first saves the ratio in every single run of you...

Why is this break not executing for the summation of pi

You never reach the value of your ratio of PrevSum/pie. I inserted 2 lines, the first saves the ratio in every single run of you...

2 months ago | 0

Answered

Solve equation in matlab

% rewrite equation to be equal to zero for fsolve and save as a function handle eqn = @(beta, L) cos(beta .* L) .* cosh(beta .*...

Solve equation in matlab

% rewrite equation to be equal to zero for fsolve and save as a function handle eqn = @(beta, L) cos(beta .* L) .* cosh(beta .*...

2 months ago | 0

| accepted

Answered

How to remove first consonant/consonant cluster and add it to the end?

Here is a little function, that can do this a = ["desk", "hello", "cup", "switch", "smith", "flowers", "angry", "decorations"]...

How to remove first consonant/consonant cluster and add it to the end?

Here is a little function, that can do this a = ["desk", "hello", "cup", "switch", "smith", "flowers", "angry", "decorations"]...

2 months ago | 0

| accepted

Answered

Shape Interpolation from csv

If the curvature is small enough compared to the distance between the original points, a little bit of analytical geometry might...

Shape Interpolation from csv

If the curvature is small enough compared to the distance between the original points, a little bit of analytical geometry might...

2 months ago | 0

Answered

Aligning columns in a matrix by padding with zeros

Under the assumption that you have at least one not corrupted column (here column 2), this might work: A = [1698 1696 1699 1...

Aligning columns in a matrix by padding with zeros

Under the assumption that you have at least one not corrupted column (here column 2), this might work: A = [1698 1696 1699 1...

2 months ago | 0

| accepted

Answered

How to avoid the ending drop of the movmean curve?

Use the Endpoints option: data = [386 379 295 238 159 190 384 402 552 347 463 259 412 481 523 589 611 479 320 403 642]; window...

How to avoid the ending drop of the movmean curve?

Use the Endpoints option: data = [386 379 295 238 159 190 384 402 552 347 463 259 412 481 523 589 611 479 320 403 642]; window...

2 months ago | 0

Answered

help with a vibratonal analysis code

m1=53;% Mass m2=62.096; k=3.096e+006 ; % Stiffness c=150; % Damping % 4 x 4 matrices disp('4 x 4 Mass matrix'); mt=[c,0,m1...

help with a vibratonal analysis code

m1=53;% Mass m2=62.096; k=3.096e+006 ; % Stiffness c=150; % Damping % 4 x 4 matrices disp('4 x 4 Mass matrix'); mt=[c,0,m1...

2 months ago | 0

| accepted

Answered

Not able to integrate a matrix.

You missed to define some values, for generality i setted them to be symbolic variables. Also integral is a function for numeric...

Not able to integrate a matrix.

You missed to define some values, for generality i setted them to be symbolic variables. Also integral is a function for numeric...

2 months ago | 0

Answered

Error using bar (line 172) X must be same length as Y.

Transpose y: x = 1990; y = [10 20 30]'; bar(x,y)

Error using bar (line 172) X must be same length as Y.

Transpose y: x = 1990; y = [10 20 30]'; bar(x,y)

2 months ago | 0