Community Profile

# Torsten

Last seen: Today Attivo dal 2013

#### Content Feed

Visto da

Risposto
Solving ODE with boundary conditions
You have a first-order ODE. For first-order ODEs, you can prescribe one boundary condition, not two. Or one of the parameters ...

circa 17 ore fa | 1

Risposto
Help with non linear equations.
fun = @(x)[8.07-(x(1)-x(2)+x(2)*0.9^(-1/x(3)));11.82-(x(1)-x(2)+x(2)*0.5^(-1/x(3)));284.23-(x(1)-x(2)+x(2)*0.1^(-1/x(3)))]; x =...

circa 19 ore fa | 1

Risposto
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
k1=180; k2=50; k3=220; knew=linspace(k1*0.4,k1*1.6,20); m1=1.1; m2=3.4; for i=1:length(knew) K{i}=[knew(i)+k2,-k2;-k2,...

circa 20 ore fa | 0

Risposto
How do i plot two graphs in the same figure without it telling me that the vectors must be the same length?
Use figure; scatter(Stroom,Spanning_fit); hold on Stroom1 = 0:5:140; Spanning_fit = Stroom1*...

circa 22 ore fa | 0

Risposto
Passing arguments through a function
x = -5:1:5 disp(TopFunction(@(x)lin(x,1,2),x)) disp(TopFunction(@(x)square(x,1),x)) function y = TopFunction(func,x) y = f...

circa 23 ore fa | 0

Risposto
Why is my code showing output as an array instead of single value?
If your inputs and the variable t are scalar values, A cannot be an array. My guess is that you specified t as a vector. %A ch...

1 giorno fa | 0

Risposto
In MATLAB, you don't need to load a package: pkg load symbolic This is an octave command. In MATLAB, either you have a licenc...

1 giorno fa | 0

Risposto
solving system of non-linear equations for array of variables gives 0x1 syms
The numerical solver does not find a solution. Are you sure a solution exists ? epsilon0 = rand(3,1); P = 0.05; options = op...

1 giorno fa | 0

Risposto
Why does .* create a matrix when multiplying a row vector by a column vector
Why does this happen? After some reading I learned matlab has 'implicit expansion' which is what I assume is happening. But I gu...

1 giorno fa | 1

Risposto
using a Monte Carlo simulation with 100,000 trials to find the probability of a random integer that is larger than the other random integer in [4,21]
A > B, and A >= B. I think the right code is supposed to plot a figure with a blue line and a red line, and there should be 100,...

2 giorni fa | 0

Risposto
Controlling state transition using transition probability matrix in Markov chain?
I understood that if my current state is 2 and if transition probability is 0.4 then from TPM my next state will also be 2. Th...

2 giorni fa | 0

Risposto
gamultiobj constraints without any mathematical relation with variables
Use an output function "OutputFcn" specified in the options structure of the solver. Within this function, you can calculate "a...

2 giorni fa | 0

Risposto
fzero not working with nested functions and mvncdf
r = 0.03; d = 0.06; sigma = 0.2; V0 = 100; L = 40; VB = 0.6*L; TL = 10; T = 1; a = (r - d - sigma.^2./2)./(sigma.^2); K...

2 giorni fa | 0

| accettato

Risposto
strange solution of an equation by Symbolic Toolbox
A MATLAB error. A second "solution" is computed that does not solve the equation. MATLAB needs to square your equation several...

2 giorni fa | 0

Risposto
Find minimum value of a function with 4 parameters
distanceAntenes = @(x) -sqrt((x(3)-x(1))^2+(x(4)-x(2))^2); x = fmincon(distanceAntenes, [5 6 3 7],[],[],[],[],[0 0 0 0],[10 10 ...

2 giorni fa | 0

Risposto
I have a line of experimental data and need to plot confidence interval
N = size(y,2); instead of N = size(y,1);

2 giorni fa | 0

Risposto
does anyone know how to solve these two problems?
One way to solve the two problems: https://de.mathworks.com/help/symbolic/sym.piecewise.html

3 giorni fa | 0

Risposto
Arrays have incompatible sizes for this operation
You should look up characters and if-statements in the documentation. clc; clear; %This function is will determine the rate o...

3 giorni fa | 1

Risposto
How to take the sum of a series of variables to a limit?
What's the underlying function with these Fourier coefficients ? %% Fourier coefficients a_(10) = (6)/(20*pi)*exp(pi/2); a_(9...

3 giorni fa | 0

Risposto
Use Ode 45 in Chua's system with non linear function need to be solved but I don't know how iterate the non linear function in loop?
[t,x] = ode45(@chua_function,[0 150],[0.1 0.1 0]); plot3(x(:,1),x(:,2),x(:,3),'r') title(" Chua's circuit") xlabel('x') ylab...

3 giorni fa | 1

| accettato

Risposto
Finding the root of a function between an interval
format long y = @(x) 1 - sin(x); z = @(x) x.^2; test1 = @(x) y(x)-z(x); x = fzero(test1,[0 1])

3 giorni fa | 0

| accettato

Risposto
Creating a script with multiple conditions and equations
T = @(T_ute) (36.44 - 0.64*T_ute).*(T_ute<-4) + 39*(T_ute>=-4 & T_ute<=4) + (43.26 - 1.06*T_ute).*(T_ute > 4 & T_ute <=21) + T_u...

3 giorni fa | 0

Risposto
Some Problems related to linear equation and elliptic equation
syms a b x y k m eqn1 = x^2/a^2+y^2/b^2==1; eqn2 = y==k*x+m; eqns = [eqn1 eqn2]; [x,y] = solve(eqns,[x,y]) P1 = [x(1),y(1)...

3 giorni fa | 1

| accettato

Risposto
Solving linear system with constraints
x0 = 2; sol = fmincon(@obj,x0,[],[],[],[],[],[],@nonlcon) function value = obj(x) value = -x; end function [c, ceq] =...

3 giorni fa | 1

Risposto
Euclidean distance between the rows of the matrix and the vector
A = rand(30,4800); B = rand(1,4800); C = sqrt(sum((A-B).^2,2))

4 giorni fa | 0

Risposto
How can I calculate vector relative errors in percent?
x = rand(100,1); ms = mean(x); vs = var(x); relative_error_ms_in_percent = abs(ms-0.5)/0.5 * 100 relative_error_vs_in_percen...

4 giorni fa | 0

Risposto
Solving a Delay Differential Qquations that involves a mass matrix
Write out your system and you will find that x3 = x6 = x7 = x8 = x9 = 0 and you are left with the equations x1(t) = sin(2*pi*...

4 giorni fa | 0

Risposto
I have differnt coodinate after use fmincon
x0=[0 0]; lowerbound =[-1 -1]; upperbound = [1 1]; sol = fmincon(@distance,x0,[1 1],2,[],[],lowerbound,upperbound) functi...

4 giorni fa | 0

Risposto
How to plot the diffusion curve for different timesteps?
Save C in the loop for the values of t where you want to plot the curves. You should get a matrix like C(ntimes,nx). Then outsi...

5 giorni fa | 1

Risposto
Calculation of the center of mass of a cone