Beantwortet
SOLVING SYSTEM OF ODEs
Write your three equations in the same independent variable (thus either t or tau). I assume all three equations are written in...

etwa 3 Jahre vor | 0

Beantwortet
What does hash X (#X) mean in a system of differential equations solution (dsolve)?
The solution depends on the roots of a polynomial of degree 3. The independent variable of the polynomial is denoted by #X. If ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Unable to solve the collocation equations -- a singular Jacobian encountered.
You have an ODE that has a singularity at x=0. Further, solving for D2y leads to two different differential equations. You must ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Implementation of 4-step Runge-Kutta
Change the order of the input arguments for f: f = @(t,y) ... instead of f = @(y,t) ...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to perform integration for the following condition?
alpha= (1 + (((H-Z)/H)*(fa-1)))*Kh*sin((2*pi/T)*(t-(H-x_d)/Vs_S)); m = @(z)Gamma*(H-z)*(tan(Beta)+cot(alpha)); K = @(z) alpha*...

etwa 3 Jahre vor | 0

Beantwortet
How to solve symbolic function
syms t ap eq=(ap^2*t^3)/2 - ap*t^3 + (ap*t^2)/2 - t^3/2 + t^2/2 + (127*t)/8 - 8 sol=solve(eq==0,'ReturnConditions',true,'MaxDe...

etwa 3 Jahre vor | 0

Beantwortet
I am trying to use Events option in ode45 for my program , please help!
Replace val=y(:,3)-1315; by val=y(3)-1315;

etwa 3 Jahre vor | 0

Beantwortet
Solving a PDE using PDE Toolbox
C.ri = 0.0125; C.ro = 0.0375; C.alpha = 1.905*10^-5; C.Ti = 673; C.T0 = 573; r = linspace(C.ri,C.ro,50); t = linspa...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Solve linear equation in matrix form
Why don't you use pi0 = null((A0+R*B).'); if ~isempty(pi0) pi0 = pi0.'/(pi0.'*inv(I-R)*e) end

etwa 3 Jahre vor | 0

Beantwortet
determine the reaction parameter using regression method. i need to know about n, E, A
If you take the logarithm on both sides of your rate equation, you get a linear regression problem. Use \ to solve for the unkno...

etwa 3 Jahre vor | 0

Beantwortet
ODE45 to solve multiple degree of system free vibration
Maybe you mean m1=10; m2=10; m3=10; m4=10; k1=50; k2=50; k3=50; k4=50; M=[m1 0 0 0;0 m2 0 0;0 0 m3 0;0 0 0 m4]; K=[k1+k2 -k2...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to run please this example perfectly to get optimal solution .. Thank you
f = [0 ; -10 ; 0 ; -6; -20] ; A = [1 0 0 0 0 ; 0 1 0 0 0 ; 0 0 1 0 0 ; 0 0 0 1 0 ; 0 0 0 0 1] ; B = [...

etwa 3 Jahre vor | 1

Beantwortet
How to normalize plot?
x0 = -.02:0.001:.02;lambda=532*10^-9; y0 = -.02:0.001:.02;w0 = 0.002; omegax=1;omegay=2;zr=pi*w0^2/lambda; m = 2; s=1;k=0.00...

etwa 3 Jahre vor | 0

Beantwortet
How to Double integrate cell of array containing cell of array?
Works. If your problem is more complicated, you will have to include the code as plain text (no graphics) in order to see where ...

etwa 3 Jahre vor | 0

Beantwortet
How to produce Gaussian random variable between two vectors ?
sr = [1,2,2,2,3,3,3,4,5]; % various possible source for i = 1:numel(sr) pd{i} = makedist('Normal',0, sqrt(2)); %generate Gau...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Solving Non-Linear Equations in Matlab by Iteration
First step: Give numerical values to all variables except "taf" Second step: Plot dhO2out+dhN2out+dhCO2+dhH2O - sum (v10) as...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
Problem Calculating Mean of Function
It's obvious that mean(x/y) does not equal mean(x)/mean(y) for arrays x and y. Test it for a simple example.

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Evaluating a function using kramers-kronig relation
syms omega omega0 Omega Gamma real kappa(omega) = 1/(2*pi) * Gamma^2/((omega-omega0)^2 + Gamma^2) ; nR(omega) = 1 + 2/pi*int(O...

etwa 3 Jahre vor | 0

Beantwortet
Solving BVP PDE in 3D
Would like to confirm if these are all my options or if there are others. Using MATLAB, these seem to be the only options. And ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Solving ODEs with variable updates at a set of discrete time points.
However, this is computationally expensive, and I'm looking for a way to incorporate these variable updates into a single simula...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
I am trying to solve those two coupled differential equations analyticaly or numericaly but I only received errors. I will appreciate any help
An analytical solution of your equations seems hopeless because of the exp(...) term. Use a numerical approach. ico=10; ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Error in line 53 when using linear interpolation
The name of the interpolation function is "interp1", not "interpl".

etwa 3 Jahre vor | 1

Beantwortet
Array indices must be positive integers or logical values.
You define a variable "length" as length = (3.76*(P/abreast) + 33.2); % Fuselage length in ft This conflicts with the MATLAB f...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
,v1Trying to solve a linear equation matrix with a log of X1-X5 in the matrix. Not sure how to use the log value in simulate to get correct result.
A = [1 0 0 0 0 0.05 0 0 0 0 0;-1 1 0 0 0 0 0.05 0 0 0 0;0 -1 1 0 0 0 0 0.05 0 0 0;0 0 -1 1 0 0 0 0 0.05 0 0;0 0 0 -1 1 0 0 0 0 0...

etwa 3 Jahre vor | 0

Beantwortet
how can i loop a cvs file so that it weeds positive results out of the negative results and separates them into different age groups
This pulls out positive results from a positive / negative result chart: X = X(X>0) This assigns the positive results to each ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Error: Index in position 2 exceeds array bounds. Index must not exceed 1.
You defined a variable called "zeros": zeros = [1; -1]; This conficts with the MATLAB function to define an array of zeros: y...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Pdepe- Spacial Discretization has failed. Trying to solve a heat transfer equation and I'm confused on how to definte the boundary conditions for my case
At the moment, your boundary conditions read k*dT/dx = -40 at x = 0 k*dT/dx = -T at x = L I don't think this is what you try...

etwa 3 Jahre vor | 0

Beantwortet
simulation takes hours to run. ''variable appears to change size on every loop iteration( within a script). how do I preallocate for speed please?
Preallocate it with the largest possible size. But if the simulation takes hours, I doubt the missing preallocation is the bottl...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do I place a point anywhere along x axis (with range 100m) in a plot?
x0 = 53; y0 = 0; plot(x0,y0,'o') ylim([0 1]) xlim([0 100])

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
can someone help with this error please
Instead of tspan = [0,2] use tspan = linspace(0,2,100) This fixes the number of output times to 100 for both calls to ode45...

etwa 3 Jahre vor | 1

Mehr laden