回答済み
how to write matlab code
N=20:50 A = setdiff(N,N(mod(N,4)==0 & mod(N,5)==0))

20日 前 | 0

回答済み
Partial Differential Equation Toolbox
Take c = [- x, x - y ; - ( x - y ), - y] Then -div(c*grad(u)) = x * d^2u/dx^2 + y * d^2u/dy^2 Section 2-62 in http://www....

21日 前 | 1

| 採用済み

回答済み
Solving for two uknown vectors in a matrix equation
syms t1 t2 s1 s2 s3 [solt1 solt2 sols1 sols2 sols3] = solve([N*[t1;t2]+R*[s1;s2;s3] == x],[t1 t2 s1 s2 s3])

21日 前 | 0

回答済み
Question about Taylor series
d(1) = cos(a), d(2) = -sin(a), d(3) = -cos(a), d(4) = sin(a) So your if-statement to determine f^(n)(a) is wrong. Further, "er...

21日 前 | 0

回答済み
solving an implicit function with two variables
Multiply by P^r and substitute P^r = x. You'll get a quadratic equation in x. Solutions are P1 = ( (Q^(-r)) / 2 * (1 + sqrt(1 ...

21日 前 | 1

| 採用済み

回答済み
Standard Deviation of product of two Gaussian Distribution.
https://math.stackexchange.com/questions/1416518/standard-deviation-of-the-product-of-gaussians

22日 前 | 2

| 採用済み

回答済み
Solving compound linear optimization problem
Look up https://de.mathworks.com/discovery/multiobjective-optimization.html

22日 前 | 0

回答済み
How do I solve for the upper bound of a definite integral when I know what the integral is equal to?
a1=...; a2=...; w=...; xo=...; value_integral=...; sol = fzero(@(C)((integral(@(x)1./(a1*sin(w*x)+a2*sin(3*w*x)))-value_int...

22日 前 | 1

回答済み
Pseudo-random distribution of points with minimum distance
See Bruno Luong's code under https://de.mathworks.com/matlabcentral/answers/432516-model-of-a-crowd-on-concert-venue-or-how-to-...

25日 前 | 0

| 採用済み

回答済み
Last Tableau of Simplex Method in LP Problem
https://www.12000.org/my_notes/simplex/index.htm

25日 前 | 0

| 採用済み

回答済み
Error in ode function -- not enough input arguments
Change these lines: dEc2adt = @(t, Ec,Tc) (-alfa.*Ek2a(t))./Tc - Ec./Tc; [t2a Ec2a] = ode15s(@(t,Ec)dEc2adt(t, Ec,Tc), t2a, ...

26日 前 | 1

| 採用済み

回答済み
Solvin Differential Algebraic Equations
function main %gaslift systems network tspan = [0:1:60]; % The script for gas lift network model defining initial condi...

26日 前 | 0

| 採用済み

回答済み
Problems with numerical integration with 2 variables
function main Result = integral(@fun,0,pi/2) end function funret = fun(theta) n = numel(theta); funret = zeros(n,1)...

28日 前 | 0

| 採用済み

回答済み
How do you get ten random values between -pi/2 and pi/2
theta = -pi/2 + rand(10,1)*pi

28日 前 | 0

回答済み
How do I differentiate this function?
syms Z K gamma eta alpha NRC EOS1 v X R EOS2 NRM Y= Z*K^gamma*((1-eta)*((1-alpha)*NRC^EOS1+alpha*(X^v+R^v)^(EOS1/v))^(EOS2/EOS...

28日 前 | 0

| 採用済み

回答済み
Tensor product of three matrices
M = kron(A,kron(B,C)) or M = kron(kron(A,B),C)

28日 前 | 1

| 採用済み

回答済み
How do I assign part of a matrix to be a variable
A1 = A(1:3,:); A2 = A(4:6,:); A3 = A(7:9,:);

29日 前 | 0

回答済み
Solving partial differential system
s= [-v*DuDx(1)-psi*km*(qe-u(2)); km*(qe-u(2))]; function [pl,ql,pr,qr] = pdex4bc(xl,ul,xr,ur,t) Q=2.5; %mL min^-1 A_c=1.96e...

29日 前 | 1

| 採用済み

回答済み
I need matlab code for cot(x) Taylor Polynomial Function
f = @(x)cot(x); a = 5*pi/8; P0 = @(x)f(a)*ones(size(x)); P1 = @(x)f(a)+(- f(a).^2 - 1).*(x-a); P2 = @(x) f(a)+(- f(a).^2 -...

29日 前 | 0

回答済み
Integro-differential systems
Solve d(psi)/dt = x(t), psi(0)=0 dx/dt = psi(t) - x(t), x(0) = ? Best wishes Torsten.

29日 前 | 1

回答済み
PDEPE boundary condition outputting odd results.
function main m = 0; tspan = linspace(0,365*20*86400,21); xmesh = linspace(0,20,201); sol = pdepe(m,@pdefun,@icfun,...

約1ヶ月 前 | 0

| 採用済み

回答済み
Need help with the integral
format long I = 0.0; Iexact = 0.904524237900272; eps = 1e-15; n = 0; while abs(I-Iexact) > eps I = I + (-1)^n/(factorial(...

約1ヶ月 前 | 0

| 採用済み

回答済み
Generate random number from a two-parameter exponential distribution
gam = ...; lambda = ...; n = 100; x = gam - log(1-rand(n,1))/lambda give you 100 random numbers distributed according to you...

約1ヶ月 前 | 0

| 採用済み

回答済み
how to run optimisation problem
Use fmincon with objective function f = @(x)(R'*x)/sqrt(x'*sigma*x) and linear constraint Aeq = ones(size(x)) beq = 1 Best...

約1ヶ月 前 | 0

回答済み
How to take the fourth derivative of a reflectance graph
If you have the signal processing toolbox licenced, use "sgolay" and "sgolayfilt". Or download from the file exchange: https:/...

約1ヶ月 前 | 0

| 採用済み

回答済み
Saving all the variables from an ode45 Function
[tw1,yw1] = ode45('Newscript_VectorField',Timet1,Ic1,options) w = yw(:,1)*Yi11 + yw(:,2)*Yi12

約1ヶ月 前 | 1

回答済み
How to automatically constrain some of the unknown values in an optimization problem?
If you know in advance which elements of the x-vector are grouped together, you can simply use Aeq and beq to define the equalit...

約1ヶ月 前 | 1

| 採用済み

回答済み
Too many input arguments - Fminsearch
function fmin x0=0; %parâmetro de valor inicial para a condição options=optimset('Display','iter','TolFun',0.1) [x]=fmi...

約1ヶ月 前 | 0

回答済み
Error in while loop
Do you want a different value for B for each minor, i.e. B(i) instead of B ? Then use function IsStable(polynomial) if AllNon...

約1ヶ月 前 | 1

| 採用済み

回答済み
Combining vectors [1 2 3 4 5] and [2 3 4 1 5] to [12 23 34 41 55]
v = 10*v1 + v2

約1ヶ月 前 | 0

| 採用済み

Load more