Community Profile

# Stephan

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

Knowledge means knowing where it is written...

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

View all

Contributions in
View by

Bvp with unknown parameter
Try this using a good initial guess: <https://de.mathworks.com/help/matlab/math/solve-bvp-with-unknown-parameter.html>

12 days ago | 1

Matrix symbolic calculation doesn't simplify expressions
try simplify - here is an example with your expression: syms w E = eye(3) * - (2^(1/2)*((2^(1/2)*w*1i)/2 - 2^(1/2)/8))/2 + (2^...

24 days ago | 1

| accepted

char to vector conversion. using matrix of chars (16x128)
str2double or str2num should work for this.

1 month ago | 0

Keep getting 'ans' output in Matlab function
Call it this way: [outResult, logoutResult] = file1(scalar, genvec)

1 month ago | 0

| accepted

This function may help: M = [13,10,5,2;7,14,11,6;3,8,15,12;1,4,9,16] MyResult = readDiag(M) function R = readDiag(M) R = c...

1 month ago | 0

| accepted

How to cite only part of a vector in an equation?
One possible way: You could use findgroups in combination with splitapply. For example, a JaneDoe group would be a member of th...

1 month ago | 0

how to train image?
A good starting point maybe here: https://de.mathworks.com/help/deeplearning/getting-started-with-deep-learning-toolbox.html?s_...

1 month ago | 0

| accepted

How can i use toeplitz in cell arrays?
G = cell(1,2); G{1} = ones(2); G{2} = 2*ones(2); c = [G{1} G{2}]; r = [G{1} zeros(2)]; result = toeplitz(c,r) results ...

1 month ago | 0

Solving equation for a value of x
You can use polyder, that calculates the derivative of a polynomial and then you can calculate the result at x=20 using polyval....

1 month ago | 0

| accepted

Index in position 1 is invalid PID Controller
When you run this the first time you first call the inbuilt function tf and then later you create a variable, which is named tf ...

1 month ago | 0

min- imum number of coins required to pay
You have some issues in your if-else structure, but also you have a numerical problem - use uint datatype to avoid this: [NumCo...

1 month ago | 1

| accepted

Problems using NVIDIA GeForce RTX 3090 for Deep Learning
Even if you don't like it, the best and probably most up-to-date answer to this question is: https://de.mathworks.com/matlabcen...

1 month ago | 0

Show every step of lsqnonlin won't work
I think you look for something like this: phi1=1:((2*pi/10.71)):2*pi; r = -0.5 + (0.5 + 0.5) * rand(1,10); xrand ...

1 month ago | 0

4-D uint8 , what does it mean?
There is a 2D for height and width of the video, which shows the resolution, the 3rd D is for example is of size 3 for RGB or of...

1 month ago | 1

| accepted

Solve nonlinear equation using ODE45 function with different initial conditions
Corrected: %% Main Script L = 1; g = 9.81; h = 0.25; t = [0 5]; A = [0 1;(g/L) 0]; B =[0 1]'; Ics = [pi,0;pi/2 0;pi/5 ...

1 month ago | 0

How can i write a Objective function in vectorized form for GA optimization toolbox when the Objective function has many varialbess?
str1 = ("x(:," + (1:100) + ") .*"); str2 = ("x(:," + (101:200) + ") .*"); str3 = ("x(:," + (201:300) + ") +"); str = vertcat(...

1 month ago | 1

| accepted

Error using optimoptions (Reference to non-existent field 'TolFunValue')
For *|optimoptoptions|* the correct option is *|FunctionTolerance|*. The usage of *|TolFunValue|* is the equivalent option when ...

1 month ago | 1

| accepted

Alternative to the function "findpeaks for the Version R2012b
Check FEX: https://de.mathworks.com/matlabcentral/fileexchange/25500-peakfinder-x0-sel-thresh-extrema-includeendpoints-interpol...

2 months ago | 0

| accepted

curly brackets system of equations via LaTeX
figure title({'\$sin(x-y)-xy+1=0\$','\$x^2-y^2=0.75\$'}, 'Interpreter','LaTex')

2 months ago | 1

Global optimization: transfer variables to non-linear constraints
nonlcon = @(x)unitdiscc(x,a,b,c,d...)

2 months ago | 0

| accepted

Convert single data to double
You might want to use <https://de.mathworks.com/help/matlab/ref/squeeze.html *|squeeze|*> and <https://de.mathworks.com/help/mat...

2 months ago | 0

| accepted

Help With plotting 3D Graph
Use: t=t.'; then call Result = psi(t) Also make sure that t is length needed --> here 2000

2 months ago | 0

| accepted

Importing Engine Map Variables
T = readtable('C:\YOUR_PATH_NAME_HERE\Veri-MATLAB.xlsx') RPM = T{2:end,1} Power = T{1,2:end} Data = T{2:end,2:end} subpl...

2 months ago | 1

| accepted

differentiation in matlab of two functions
syms a(theta) p q A eq1 = a(theta)==exp(2*pi*1i*A*[cos(theta);sin(theta)]) eq2 = theta==atan(p/q)+pi Deq1 = diff(eq1,thet...

2 months ago | 0

Fimplicit not plotting properly
fun1=@(x,y) a.*x.^2+2*h.*x.*y+b*y.^2+2*g.*x+2*f.*y+c; a=2; h=0; b=0; g=3/2; f=1/2; c=7; fimplicit(fun1,[-3 2 -12 -5])

2 months ago | 1

| accepted

How to rotate a video 180 degrees?
vidName = 'xylophone.mp4'; vidPath = strcat(videosPathToBeEdited, vidName); V = VideoReader(vidName); % read the complete ...

2 months ago | 1

| accepted

How to loop function for a 2 column matrix
You do not need a loop - the distance function is vectorized and accepts vector-inputs. You simply need to use indexing to get w...

2 months ago | 1

| accepted

differential evalution code Error using * Inner matrix dimensions must agree.
@(x)sum((minus((x(1)),V).*sin(2.*pi.*x(2).*t+x(3)).^2))/n % ^ % | % ...

2 months ago | 1

| accepted