Answered
Need help to code the power Low fit using least square regression
function main X = [0.17,0.17,0.5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3.5,3.5,4,4,4.5,6,6,10,10,10,12,15,18,24,24,24,24,24,24,24...

7 years ago | 0

Answered
Solving differential equation with varying Constant
function [dUdt]=eqn(t,U) dUdt=zeros(7,1); K=0.003; t_inter=0:99; T_actual=interp1(t_inter,G,t); Q_actual=interp1...

7 years ago | 1

Answered
Determine eigvector through eigvalue without using eig
By definition, the eigenvectors are the null space of A-lambda*I. Thus you can get the eigenvectors by null(A-lambda*eye(siz...

7 years ago | 1

Answered
Optimize the Max Min over two sets for the given function
max: eps s.c. [norm(a_j - sum_{i=1}^{i=k} lambda_i*b_i,2)]^2 >= eps (j=1,...,m) sum_{i=1}^{i=k} lambda_i = 1 lambda_i >=0 ...

7 years ago | 0

Answered
Speeding up solution to system of ODES
function main %Parameters %Heston Parameters S0 = 100; K = 100; T = 1; k = 2.5; sigma = 0.5; v0 = 0.06; vb = 0.06; ...

7 years ago | 0

| accepted

Answered
Solving coupled PDE-System for advection diffusion problem
f = [C3*DuDx(1)+C4*DuDx(2);C8*DuDx(1)+C7*DuDx(2)]; s = [C1*DuDx(1)+C2*DuDx(2);C6*DuDx(1)+C5*DuDx(2)];

7 years ago | 2

Answered
How to iterate until convergence?
function main R0 = 1.0e-6; R = fzero(@fun_iter,R0) end function res = fun_iter(R) % Undercooling calculation % Consta...

7 years ago | 0

Answered
generate data from arbitrary probability random function
n = 1000; ur = zeros(n,1); u = rand(n,1); f = @(x)7.6*exp(-2.1*x)+1.6*exp(-1.8*x).*cos(2.2*x+1.3)+9.4*exp(-2.04*x).*cos(x-2.6...

7 years ago | 0

Answered
How to write a code for an iteration?
fold = [1 5 10 15]; n= 100; for i=2:n f = [fold(1)+fold(2),fold(3)+fold(4),fold(1)-fold(2),fold(3)-fold(4)]; fold = f; ...

7 years ago | 0

Answered
How to find a smooth normal distribution curve
help histogram help mle

7 years ago | 0

Answered
Failure in initial nonlinear constraint function evaluation. FMINCON cannot continue.
The way you call fmincon, "t "should not be inside the list of input parameters to the constraint function.

7 years ago | 0

Answered
How to use linprog solver for some values of variables needs to have equal value
A = [-1 1 0 0 0 1 -2 1 0 0 0 1 -2 1 0 0 0 1 -2 1 0 0 0 1 -1 ]; B = [-1 0 0 0 0 ...

7 years ago | 0

| accepted

Answered
Birkhoff-von Neumann decomposition of nonnegative doubly stochastic matrices
https://birkhoff.readthedocs.io/en/latest/

7 years ago | 0

| accepted

Answered
Objective function for projectile
https://de.mathworks.com/matlabcentral/answers/435557-how-to-set-up-fmincon Seems to be a homework exercise.

7 years ago | 0

Answered
How to set up fmincon
function main v0=...; % start value for initial velocity theta0=...; % start value for angle target=[... , ...]; % target p...

7 years ago | 0

| accepted

Answered
Summation with resultant vector's index as upper limit
https://de.mathworks.com/help/matlab/ref/conv.html#bucr92l-2

7 years ago | 0

| accepted

Answered
fmincon requires only double
objective= @(t) (1-t)*a + t*b; %a,b given constants without the lines syms t and objective = double(f(t))

7 years ago | 0

Answered
How can get the value for each time step for a variable inside of a function?
Result = main function Result = main %Initial conditions Wads=0.045; Tads=80; Wdes=0.035; Tdes=27; Teva=7; Tcond=27; Mw...

7 years ago | 1

Answered
Is there any solution to generate an orthogonal matrix for several matrices?
https://de.mathworks.com/matlabcentral/fileexchange/46794-simdiag-m

7 years ago | 0

Answered
using dsolve to equation
syms x1(t) alpha p eqn = diff(x1,t) == -x1*alpha+p; cond = x1(0) == 0; x1Sol(t) = dsolve(eqn,cond)

7 years ago | 1

Answered
Implementing correct heat flux boundary conditions
m = 2; % specifies spherical symmetry for PDE solver r = linspace(0,r,100); t = linspace(0,t,100); sol_temp = pdepe(m,@ma...

7 years ago | 1

| accepted

Answered
Integral2 error message
function [Ingr]=InteEpstu(tvec,uvec,K,de,mu) Ingr=zeros(size(tvec)); for i=1:numel(tvec) t=tvec(i); u=uvec(i); ...

7 years ago | 0

| accepted

Answered
minmax does not work in matlab 2018b
https://github.com/mathause/MATLAB/blob/master/General/datafun/minmax.m

7 years ago | 0

Answered
Index exceeds matrix dimensions.
"db" can not be a matrix of dimension 3 (db(:,1,2)) and of dimension 2 (db(:,3)) at the same time. Use "size" to get the dimensi...

7 years ago | 0

| accepted

Answered
how to use the 'least square fit'?
xdata = 0:0.51:195*0.51; ydata = ...; fun = @(x,xdata)x(1)*sin(x(2)*xdata.^x(3)+x(4)).*exp(-x(5)*xdata)+x(6); x0 = [-6 ,1 ,1 ...

7 years ago | 0

| accepted

Answered
How to fit data with a solution of a non linear differential equation containing multiple unknown coefficient
function main Time = [0,0.0625 0.125 0.1875 0.25 0.3125 0.3750 0.4375 0.5 0.5625 0.625 0.6875 0.75 0.8125 0.875 0.9375 1 1.06...

7 years ago | 0

Answered
How to fit data with a solution of a non linear differential equation containing multiple unknown coefficient
In cases like yours, we always refer to https://de.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitting ...

7 years ago | 0

| accepted

Answered
Lineare Optimization Pool of entries for decission variables
If pool_i is the pool for decision variable d_i and the pool contains n possible entries e_i(1),...,e_i(n), define binary variab...

7 years ago | 0

Answered
if command with @(x,t) equation
https://stackoverflow.com/questions/18183648/matlab-check-if-function-handle-is-a-particular-function-or-function-type

7 years ago | 1

Load more