Community Profile

photo

Stephan


838 total contributions since 2017

Knowledge means knowing where it is written...

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

Contact

Stephan's Badges

  • 12 Month Streak
  • Guiding Light
  • Thankful Level 2
  • Knowledgeable Level 4
  • Revival Level 3
  • Speed Demon
  • Creator
  • First Answer
  • Commenter
  • Promoter
  • Solver

View details...

Contributions in
View by

Answered
How writing code sum 1+2+3+4+...+n
n = 4; A = sum(1:n)

3 days ago | 0

Answered
error variable y in fitness function
function y=fungsi3(x) y=2+exp(-(x(1).^2+x(2).^2)).*(sin(4*x(1))+cos(8*x(2))); end

5 days ago | 0

Answered
How can I expand x axis to have normal plot?
A(:,1)=data{:,1}; A(:,2)=data{:,2}; A=sortrows(A,1); plot(A(:,1),A(:,2))

6 days ago | 0

| accepted

Answered
Check to find if a row has an element occuring more than once
A = [0 0 1 1 0 0; 0 0 0 0 0 1; 1 1 0 0 0 1] res = (sum(A==1,2)>1) This works row-wise for more than 1 rows

8 days ago | 0

| accepted

Answered
how can I create a multiplication table and write it to spreadsheet in Matlab?
a = 1:5; t = a .* a' writematrix(t,'multiplication.xlsx')

9 days ago | 0

Answered
How do you give data as argument of fmincon?
<https://de.mathworks.com/help/optim/ug/passing-extra-parameters.html>

9 days ago | 1

Answered
ode45 with two 2nd order differential equation
<https://de.mathworks.com/help/symbolic/odetovectorfield.html>

9 days ago | 1

Answered
Solve a system of odes where equations are derived from a separate code (not directly given) using syms function
Hi, have a read here: <https://de.mathworks.com/help/symbolic/odetovectorfield.html> Best regards Stephan

10 days ago | 0

| accepted

Answered
Cannot use fzero function
i recommend to use fminunc: x=fminunc(@funct,pi/2); function y = funct(x) y=7.*sin(2.*pi.*x).^2 end

11 days ago | 1

Answered
Solving system of 3 nonlinear Equations
syms EPS0 E1 A1 E2 A2 RO e_y1 e_y2 e_z1 e_z2 I_y1z1 I_y2z2 M I_z1 I_z2 alfa fun1 = EPS0*(E1*A1 + E2*A2) - (1/RO)*(E1*A1*e_y1...

12 days ago | 0

| accepted

Answered
Creating transfer function (using tf) with unknowns in it
You might want to work with tuneable models / tuneable parameters.

12 days ago | 0

Answered
Find the intersection point between 2 curves
create a function handle depending from wave length, that subtracts both from each other. this is the objective function for usi...

14 days ago | 1

Answered
fmincon with function file
change your function, that it accepts x and p as input. use: x = x(1); y = x(2); for passing p to the function read her...

14 days ago | 0

Answered
why my deeplearning toolbox can not work
you have to install the pretrained Networks seperatly. Use the Add on Manager.

14 days ago | 0

| accepted

Answered
Sine function produces unexpected results
Hi, note: >> t = 0:0.1:1 t = Columns 1 through 8 0 0.1000 0.2000 0.3000 0.4000 0.5000 0....

15 days ago | 1

| accepted

Answered
how to get float answer and not a Fraction ?
Hi, symbolic calculatuions are always precise. If you want a float point answer, you have to tell it to matlab: % one way: so...

15 days ago | 0

Answered
Define functional bounds in FMINCON optimization
Define them as nonlinear constraint function: <https://de.mathworks.com/help/optim/ug/fmincon.html?s_tid=doc_ta#busog7r-nonlc...

18 days ago | 0

| accepted

Answered
How could normalize a matrix between 0 and 1.
result = normalize(x,2,'range')

18 days ago | 1

Answered
Simulation model of Kanban Production System with SimEvents
Did you see this example: <https://de.mathworks.com/help/simevents/examples/modeling-a-kanban-production-system.html>

19 days ago | 2

Answered
How to loop the fsolve for various sets of parameters
Hi, store the parameters in an array and call fsolve in a loop. In every run of the loop you solve for one set of parameters....

19 days ago | 0

| accepted

Answered
How to draw Fig. 4
Hi, maybe this is useful: https://de.mathworks.com/help/matlab/math/solve-bvp-with-two-solutions.html As shown in the link,...

20 days ago | 0

| accepted

Answered
for loop collecting output
Hi, it is not recommended to use i - since i is reserved for complex numbers. Perhaps use k or n or ii instead. I decided to us...

20 days ago | 0

Answered
bitorreduce is undefined.
bitorreduce is a part of Fixed Point Designer - if you have a valid license for it, install Fixed Point Designer. Otherwise you ...

21 days ago | 0

| accepted

Answered
Help on solving equation?
Hi, try: A1=1.825*10^6; Zi=67; M=123; B=50.29; a=5; Z=134; AO0=2.6; P0=54.6; C=12; Ka=2.45; V=10^((-A1*(Zi^2)*sqrt(M...

21 days ago | 0

Answered
how to minimize set of values with genetic algorithm
Hi, you do not call ga here. Also your function would overwrite every input of x by the fixed values for x1...x5 inside your fu...

21 days ago | 1

| accepted

Answered
why doesnt matlab calculate this divisions
Hi, x,y are symbolic variables. Matlab shows them this way, due to accurracy. Insert a type cast to make them numbers: x...

22 days ago | 0

Answered
i need to delete a zero from a single row 10 column vector
A = [0 1 2 3 0 5] A = A(A~=0)

22 days ago | 0

| accepted

Answered
how to convert Frames into video?
<https://de.mathworks.com/help/matlab/import_export/export-to-video.html>

25 days ago | 0

Answered
ODE45: ODE Error using odearguments must return a column vector
dtmdt = (1/C_rad*((Qinj_td)- (C*(Tm-Tair).^n)))'

25 days ago | 0

Answered
ERROR: odearguments (line 90), ode45 (line 113)
add: yprime = zeros(4,1); before assigning values to yprime

26 days ago | 0

| accepted

Load more