Beantwortet
How do I get point between two high dimensional points?
0.5*(x1+x2) or in general: (1-lambda)*x1 + lambda*x2 for 0<=lambda<=1.

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Avoid evaluation in vectorised conditional expressions
If your right-hand side contains expressions with x, you must replace x by x(idx1) resp. x(idx2).

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to reorientate the orientation of a mobile robot to a specific angle.
You mean change orientation_old = [2*pi*rand(1),0] to orientation_new = fliplr(orientation_old) ?

mehr als 3 Jahre vor | 0

Beantwortet
How to integrate a lognormal pdf
Use "logncdf" with the parameter values from "fitdist" and the input values xi1.

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
bvp4c for coupled interface boundary conditions
Read this carefully, and you will know how to set up your problem: https://de.mathworks.com/help/matlab/math/solve-bvp-with-mul...

mehr als 3 Jahre vor | 0

Beantwortet
How to check whether point is inside high dimensional convex hull?
https://de.mathworks.com/matlabcentral/fileexchange/10226-inhull

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Obtaining a matrix of solutions with fsolve
Don't solve for all x values at once. Call "fsolve" in a loop and solve for each pair of combinations for (c1,c2,c3,c4) separa...

mehr als 3 Jahre vor | 1

Beantwortet
pdepe coupled boundary conditions
pl = pr = 0, ql = qr = 1 for both components u1 and u2. What's the problem ?

mehr als 3 Jahre vor | 0

Beantwortet
define a function in terms of an integral with variable limits
f1=@(t)3+2*cos(2*pi*t); f2=@(t)4-3*sin(2*pi*t); ff=@(t)-f1(t)-f2(t); gg=@(u,t)integral(ff,u,t); ww = @(u,t)f1(t).*exp(gg(u,t...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How can I improve the efficiency of an equation with double summation
rng("default") M = 100; % Some temporary vectors so that the code can run t = linspace(2,10,10001); y = sqrt(t); x = abs(ra...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do I interpolation into a ODE45 function for my trajectory code?
I additionally told ode45 to stop integration at h = 0. clc clear % define the initial conditions for the falling object y...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
custom equation fit in curveFitter is not working
pc2 = [ 0 0.0001 0.0011 0.0216 0.2847 0.8708 1.0000]; lam_2 = [ 0 30 55 110 2...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
numerical integration inf to inf
Set a=-1+eps; b=1-eps; instead of a=-1; b=1; For comparison: syms x e = 0.01; f = 1/sqrt((1-x^2)+(e/2)*(1-x^4)); valu...

mehr als 3 Jahre vor | 0

Beantwortet
Bessel Equation VPASolve for the order
nu = 0:0.1:7; B = besselk(nu,3)-5; plot(nu,B) fun = @(nu)besselk(nu,3)-5; nu = fzero(fun,[6 7])

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to plot non-quadratic functions?
I suggest you evaluate the three profit functions for a rectangular region [alpha_min,alpha_max] x [ F_min,F_max] and introduce ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Problem with undefined function
An alternative without the toolbox: logncdf_user = @(x,mu,sigma) 0.5*(erf((log(x)-mu)/(sqrt(2)*sigma))+1); x=0:0.1:10; hold o...

mehr als 3 Jahre vor | 0

Beantwortet
A system of nonlinear equations with three variables
The equations for x and y (eqnx and eqny) are polynomials of degree 3 in x resp. y. They might have several real solutions x an...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Way to solve AX=XB
dim = 4; X = sym('X',[dim dim]); A = rand(dim); B = A.'; [M, ~] = equationsToMatrix(A*X==X*B) if rank(M) < size(A,1)^2 N...

mehr als 3 Jahre vor | 0

Beantwortet
Trouble using lsqnonlin to fit the IV curve of a solar cell
You did not include global V Voc Jsc T k q J in the script part. clc clear global V Voc Jsc T k q J %reads input file ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do I represent this sym function as a written formula
syms s f = vpa(ilaplace(1/((s+7)*(s^3+4*s^2+6*s+5))),4)

mehr als 3 Jahre vor | 0

Beantwortet
Invalid use of operator. error, dont know what to change to fix it.
Elementwise operations are .* ./ and .^ .) does not exist. f = (x.^2).*exp(-x)

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
I want to check if something algebraically simplifies to 0 when i sub in values
Euler equations of gas dynamics ? Eigenvalues and Eigenvectors of the Jacobian are well-studied. Why reinvent the wheel ? syms...

mehr als 3 Jahre vor | 0

Beantwortet
How do I solve a linear optimization problem with a constrained output?
Define the X to be solved for as X = (u,x).Then you can constrain x according to your needs and continue using "linprog".

mehr als 3 Jahre vor | 1

Beantwortet
ODE45 - must return a column vector.
B = readtable('t13.xlsx'); t13 = table2array(B); c = readtable('ambient.xlsx'); ambient = table2array(c); d = readtable('sol...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to put a fit condition such that the fitted curve is not above the fitted data (Fit<Fitted Data)?
In each measurement point, add the constraint y_measurement >= fun(x_measurement) where "fun" is your exponential curve. You ...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to solve optimization problems when the objective function includes a symbolic function
The usual way to deal with this problem is to define Func2Var1 and Func2Var2 as additional optimization variables and to specify...

mehr als 3 Jahre vor | 1

Beantwortet
Plot a graph from arrays
plot(hv, cell2mat(Xm))

mehr als 3 Jahre vor | 0

Beantwortet
Function with many outputs
X=ga(@cost,numel(X)); function J = cost(X); [Y_1,Y_2] = MyFun(X); J = Y_1.^2+Y_2.^2; end

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Trial and error problem
The results are not convincing, but that's the way to go with three data points. fun1 = @(x)[0.0701-x(1)*exp(x(2)/(293.65-x(3))...

mehr als 3 Jahre vor | 1

Beantwortet
How to plot a graph correctly?
Try "fimplicit".

mehr als 3 Jahre vor | 0

Mehr laden