Knowledge means knowing where it is written...

Interested in:

- Optimization

- Mathematical Modelling

- Improvement of my programming skills

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>

7 dagen 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 = ...

9 dagen 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)] ...

10 dagen ago | 0

Answered

Implementation of Proximal Policy Optimisation

try: clear all motion_time_constant = 0.01; mdl = 'fivelinkrl'; open_system(mdl) Ts = 0.05; Tf = 20; mdl = 'fivel...

Implementation of Proximal Policy Optimisation

try: clear all motion_time_constant = 0.01; mdl = 'fivelinkrl'; open_system(mdl) Ts = 0.05; Tf = 20; mdl = 'fivel...

16 dagen 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]'

17 dagen 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)

19 dagen 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;...

20 dagen 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 ...

20 dagen 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...

23 dagen 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 .*...

25 dagen 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"]...

ongeveer een maand 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...

ongeveer een maand 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...

ongeveer een maand 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...

ongeveer een maand 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...

ongeveer een maand 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...

ongeveer een maand 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)

ongeveer een maand ago | 0

Answered

Obtaining Information from Reinforcement Learning while Training

The reward of each training episode is stored in the trainsStats struct which is the output argument of the train function. Insi...

Obtaining Information from Reinforcement Learning while Training

The reward of each training episode is stored in the trainsStats struct which is the output argument of the train function. Insi...

ongeveer een maand ago | 0

Answered

How to display Y, Cb and Cr components of an image?

I used the inbuild example file peppers_RGB_tiled.tif, which has no 4rd dimension that could be cleared, so i used a try catch b...

How to display Y, Cb and Cr components of an image?

I used the inbuild example file peppers_RGB_tiled.tif, which has no 4rd dimension that could be cleared, so i used a try catch b...

ongeveer een maand ago | 0

| accepted

Answered

solve: Cannot find explicit solution but it have solutions, matlab's bug?

Congratulations, you have 1 solution of an infinite number of possible solutions - look to the borderline case of equal to: sym...

solve: Cannot find explicit solution but it have solutions, matlab's bug?

Congratulations, you have 1 solution of an infinite number of possible solutions - look to the borderline case of equal to: sym...

ongeveer een maand ago | 0

Answered

How to use fsolve when a nonlinear equation given two arrays of parameters (not the variables)? Why can't I use for loop?

Hi, you could try to vectorize your function in order to avoid for loops - here is a simple example: % Constant 1 as a row vec...

How to use fsolve when a nonlinear equation given two arrays of parameters (not the variables)? Why can't I use for loop?

Hi, you could try to vectorize your function in order to avoid for loops - here is a simple example: % Constant 1 as a row vec...

ongeveer 2 maanden ago | 0

Answered

Question about GA and the fun.

Have a read here: https://de.mathworks.com/help/optim/ug/passing-extra-parameters.html In your case it should look somehow lik...

Question about GA and the fun.

Have a read here: https://de.mathworks.com/help/optim/ug/passing-extra-parameters.html In your case it should look somehow lik...

ongeveer 2 maanden ago | 2

| accepted

Answered

Help me I am unable to input array

They way you coded it needs to enter the single values one after each other: Enter elements of x=1 Enter elements of x=2 Ente...

Help me I am unable to input array

They way you coded it needs to enter the single values one after each other: Enter elements of x=1 Enter elements of x=2 Ente...

ongeveer 2 maanden ago | 0

| accepted

Answered

Problems using LSTM with PPO Agent - Error: Invalid input argument type or size such as observation, reward, isdone or loggedSignals.

I finally could solve the issue. The problem was that there were 2 LSTM layers in the network, which led to the error: Caused b...

Problems using LSTM with PPO Agent - Error: Invalid input argument type or size such as observation, reward, isdone or loggedSignals.

I finally could solve the issue. The problem was that there were 2 LSTM layers in the network, which led to the error: Caused b...

2 maanden ago | 1

| accepted

Question

Problems using LSTM with PPO Agent - Error: Invalid input argument type or size such as observation, reward, isdone or loggedSignals.

Hi, i implemented some RL agents (DQN, AC, PPO...) successfully with my custom environment function by using a feedforward netw...

2 maanden ago | 1 answer | 0

Answered

numerically solving an equation involving a matlab function with multiple variables

fun = @(x) blsprice(5,2,0.05,x,0.2) - 4; unknown_time = fsolve(fun,0.5)

numerically solving an equation involving a matlab function with multiple variables

fun = @(x) blsprice(5,2,0.05,x,0.2) - 4; unknown_time = fsolve(fun,0.5)

3 maanden ago | 1

| accepted

Answered

I want to get 2d image from a sensor data.What matlab commands convert a dataset to images?

A = rand(100,100) imshow(A) or A = (randi(1500,100,100))-750 image(A)

I want to get 2d image from a sensor data.What matlab commands convert a dataset to images?

A = rand(100,100) imshow(A) or A = (randi(1500,100,100))-750 image(A)

3 maanden ago | 0

Answered

How can I name matrices generated by a for loop as Z1,Z2,Z3 ...etc.

There are a lot of contributions (one of the best is here) which show why this way of coding is bad - use an efficient way by in...

How can I name matrices generated by a for loop as Z1,Z2,Z3 ...etc.

There are a lot of contributions (one of the best is here) which show why this way of coding is bad - use an efficient way by in...

3 maanden ago | 1

| accepted

Answered

Problem with solve matrix

For me your code works: disp('An economic system composed of 3 sectors has the input-output matrix'); D=[0.5,0.1,0.1;0.2,0.5,0...

Problem with solve matrix

For me your code works: disp('An economic system composed of 3 sectors has the input-output matrix'); D=[0.5,0.1,0.1;0.2,0.5,0...

3 maanden ago | 0

| accepted