Answered
To solve : System of differential equations with multiple derivative in each equation
Insert the expression of the third equation for dh_m/dt into the first equation and solve for dh/dt. Insert the so obtained exp...

4 years ago | 1

| accepted

Answered
dsolve isn't solving my symbolic ODE correctly
Is a/b resp. c/d above always positive ? Otherwise, you'll get exp-terms in the solution of the homogenous system. Maybe you ca...

4 years ago | 0

Answered
Solving second order non-linear partial differential in three independent variables
Interpret teta as time. Discretize the dT/dz, 1/r*d/dr(r*dT/dr) expressions in space. You'll arrive at a system of ordinary di...

4 years ago | 0

Answered
ode solvers state solution numerical errors
Look at the references at the bottom of the pages describing the codes, e.g. at the bottom of https://de.mathworks.com/help/mat...

4 years ago | 1

Answered
Matlab Optimiser - Number of Evaluations.
https://de.mathworks.com/matlabcentral/answers/423275-how-to-count-the-number-of-function-calls-without-modifying-it-by-insertin...

4 years ago | 0

Answered
How can I create a script that solves a function for temperatures over a length?
z is a vector. If you use short-circuit AND (&&) , each expression in the if condition must evaluate to a scalar. This is not t...

4 years ago | 0

Answered
ppval and polyval giving different results
I think you fed "polyval" with the coefficients cut to a certain number of digits. You must use the coefficients in full precis...

4 years ago | 0

Answered
1D Heat Equation Explicit Scheme (fixed)
You use for i=0:0.1:50 ... T(i,j) = ... But only positive integer values are possible as array indices. Thus something...

4 years ago | 1

| accepted

Answered
Solving a non linear ODE with unknown parameter
%time points ts=[1 2 3 4 5 6 7 8]; DP=[1000 700.32 580.42 408.20 317.38 281.18 198.15 100.12]; p0 = 1e1; p = fminunc(@(p)fun...

4 years ago | 1

| accepted

Answered
I am trying to solve a coupled set of ODE's different ways. (1) using ode45 which I have been able to do (2) solve them using Euler's method and (3) Heun's method
global k1 k2 k3 V0 v0 CA0 k1 = 0.5; k2 = 0.06; k3 = 0.04; V0 = 50; v0 = 1.5; CA0 = 0.8; % ode45 soltion method tspan = [...

4 years ago | 0

Answered
Jump in a graph
x1 = 1:0.1:108; y1 = nthroot(x1,3)*8.56; x2 = 108; y2 = 44.57; plot([x1,x2],[y1,y2])

4 years ago | 0

| accepted

Answered
curve fitting tool custom equation
Don't use the data for t > 6.3 in the fitting process.

4 years ago | 1

Answered
Undefined variable in function
fun = @(x) integral(@(omega)cos(omega*x).*sin(omega)./omega,1e-10,8,'ArrayValued',true); x = -2:0.01:2; plot(x,fun(x))

4 years ago | 0

| accepted

Answered
Having trouble trying to integrate.
fx = @(x) x.*103./200.*sin(x); q= integral(fx,0,2.794)

4 years ago | 0

Answered
An error occurred:LSQNONLIN requires the following inputs to be of data type double: 'LB'. How to solve it?
[nrtl2,fval,exitflag,output]=lsqnonlin(@(p)NRTL2(p,T,P,x1,x2,y1,y2,P1S,P2S,P3S),deltag0,[],[],options); instead of [nrtl2,fval...

4 years ago | 1

| accepted

Answered
How to find unknown parameters in a nonlinear least squares function?
A = [cos(3*t).^2,ones(numel(t),1),]; B = t.^0.8./f; X = A\B; %or X = inv(A'*A)*A'*B; c1 = X(1); c2 = 1/X(2); instead of A...

4 years ago | 1

| accepted

Answered
my error tolerance should be less than 1E-3 but ı have no idea how to integrate this factor into my code
format long f = @(x) 2^(x^2) *3^x - 7^(1/2); a = 0; b = 2; eps = 1e-5; errorF = 1.0; errorX = 1.0; while errorF > eps && ...

4 years ago | 0

Answered
Trying to get a table output when inputs are arrays for norminv function
Maybe you want something like this: for i=1:numel(mu) x(:,i) = norminv(p,mu(i),sigma(i)); end

4 years ago | 0

| accepted

Answered
Index exceeds number of array elements
Maybe it's interesting to compare with the analytical solution: T(r ) = a/r + b where a = 121/(1/0.176 - 1/0.236) b = 40 - a...

4 years ago | 0

Answered
Plotting a function containing a single integral with two variables
Use the integral expression obtained here https://www.wolframalpha.com/input?i=Exp%5B-a*x%2Bb*Sqrt%5Bc-x%5D%5D for the x-integ...

4 years ago | 0

Answered
Error in estimating Nakagami parameters using maximum likelihood estimate function: Error using prob.NakagamiDistribution>nakafit (line 271) The data in X must be positive
I don't know if this makes sense with respect to what you are trying to do, but MATLAB expects your data to fit a Nakagami distr...

4 years ago | 0

Answered
I got the error: Subscript indices must either be real positive integers or logicals. Could I have your help please?
You initialized "element_node" as a matrix of zeros. That's why you try to access node_xy(1,0),node_xy(2,0) in the area calculat...

4 years ago | 0

Answered
Why do I get "Array indices must be positive integers or logical values." error?
syms x y z f=2*x+y+2*z^2-5; g=y^3+4*z-4; h=x*y+z-exp(z); fdx = diff(f,x); %derivative of f wrt x fdy = diff(f,y); %derivati...

4 years ago | 1

| accepted

Answered
uniformly distributed random vectors
N=1000; A=rand(2,N); x=A(1,:); y=A(2,:); x = x-mean(x); y = y-mean(y); idx = x.^2+y.^2<=0.25; x=x(idx); y=y(idx); p...

4 years ago | 0

| accepted

Answered
How to use ksdensity to find the probability density of the original data when only the original data is known
Did you try to make a histogram first ? h = histogram(x,'Normalization','probability') where x is your data vector.

4 years ago | 0

Answered
Getting single answer for function with an array
D=(0.5*d*V.^2*S*Cd+K*W^2)./(0.5*d*V.^2*S) instead of D=((0.5)*d*(V.^2)*S*Cd+(K*W^2))/((0.5*d*(V.^2)*S))

4 years ago | 1

Answered
Given a list of numbers, how do you take specific numbers at time?
https://de.mathworks.com/help/map/ref/combntns.html https://de.mathworks.com/help/matlab/ref/nchoosek.html

4 years ago | 0

| accepted

Answered
Fixed Bed Adsorption Model
Cfeed = 0.0224; % Inlet concentration tf = 3000; % End time nz = 400; % Number of gateways np = nz + 1; % N...

4 years ago | 1

Answered
How to find steady state solution of recatti equation
If it's a Riccati equation, use "icare" or "idare".

4 years ago | 0

| accepted

Answered
Solving a Nonlinear Equation using Newton-Raphson Method
x=[0;0]; for i=1:3 [J,f]=jfreact(x); x=x-J\f end function [J,f]=jfreact(x) del = 0.000001; df1dx1 = (u(x(1)+del...

4 years ago | 0

| accepted

Load more