Community Profile

# Stephan

##### Last seen: Today
1,222 total contributions since 2017

Knowledge means knowing where it is written...

Interested in:
- Optimization
- Mathematical Modelling
- Improvement of my programming skills

View details...

Contributions in
View by

Solving a function with fsolve
VaR_NE = fsolve(@NEcdf,0) function fx = NEcdf(x) alpha_VaR=0.99; hetta_RL=-0.0047; omega_RL=0.0077; delta_RL=0.0041; fx ...

20 hours ago | 0

Solving a symbolic system of equations
Try: % Equillateral Strain Rosette Problem % angle values (A = 0, B = 120; C =60; seems to be standard for a 60 degree % eq...

1 day ago | 1

| accepted

Why should I use the zeros function?
It is for performance reasons: https://de.mathworks.com/help/matlab/matlab_prog/preallocating-arrays.html

3 days ago | 1

Input arguments error on line 2
Divide your code into a function for your ode and the part for solving and plottting the results: y0 = 0; % --> change to 1 for...

4 days ago | 0

| accepted

what is wrong?
Typo - it is cos instead of cox, and the usage of '.*' elementwise multiplication x=-3:0.1:3 y=sin(x).*cos(2*x)+1 plot(x,y)

4 days ago | 0

Differentiation for relative sensitivity calculation
D_xN = diff(xN,Nd)

4 days ago | 0

how to plot this ?
syms x; y=exp(-x).*sin(x); fplot(x,y);

4 days ago | 1

Asking for help with syntax for fmincon
The solvers in Matlab accept only one vector as variable. So change y(1) --> x(3) and y(2) --> x(4). Then edit the code this way...

4 days ago | 0

| accepted

Calculate the population mean of several probability distributions
Du kannst das direkt in der Schleife machen, in dem Du die benötigten Felder der struct ansprichst und die interessierenden Wert...

4 days ago | 0

Subscript in figure WHAT AM I DOING WRONG?

4 days ago | 0

| accepted

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)

5 days ago | 0

| accepted

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

5 days ago | 0

| accepted

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

6 days ago | 0

| accepted

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

6 days ago | 0

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

6 days ago | 0

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

7 days ago | 0

| accepted

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

7 days ago | 0

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

7 days ago | 0

Solving nonlinear second order diferential equation
%% Dados iniciais clear Massa_foguete_seco = 3000; % Kg Massa_combustivel_inicial = 3000; % kg Empuxo ...

10 days ago | 0

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_...

10 days ago | 0

| accepted

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

10 days ago | 0

| accepted

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_...

10 days ago | 0

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

1 month ago | 0

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

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

Solving Integral via MATLAB!!
syms a b z eq = (a-z) / ((1+z)*(b+z)); pretty(eq) sol = int(eq,z); pretty(sol)

2 months ago | 0

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

2 months ago | 0

| accepted

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

2 months ago | 0

| accepted