Beantwortet
For some reason, I am not getting plots when I put in this code for this question.
if Delta > 0 % Case of real and distinct roots x1 = (-b + sqrt(Delta)) / (2*a); x2 = (-b - sqrt(Delta)) / (2*a)...

mehr als 2 Jahre vor | 0

Beantwortet
I get an error despite that the variable xddot is in the scope of the Nested function
To compute Fxfr in the line f1 = a*(Fyfr + Fyfl) - b*(Fyrr + Fyrl) + Bf/2*(Fxfl - Fxfr) + Br/2*(Fxrl - Fxrr); you need x...

mehr als 2 Jahre vor | 0

Beantwortet
correct the following code for unsteady maxwell nanofluids
dydx has to consist of 6 equations: dydx(1) = y(2), dydx(2) = y(3), dydx(3) = f''' dydx(4) = y(5), dydx(5) = g'' dydx(6) = h'...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Numerical differentiation in time in function used by ODE
ode15s can solve systems of differential equations of the form M*y' = f(t,y) where M is the so called mass matrix. If a row j of...

mehr als 2 Jahre vor | 0

Beantwortet
Finding Solution to Inequality in Matlab
I don't understand the result, but there is some output from the symbolic toolbox. As you can see, the numerator of sol.x is a ...

mehr als 2 Jahre vor | 1

Beantwortet
Nonlinear equation solver for neoclassical growth model
Set the right-hand sides of the resource constraint and the production constraint equal and solve for i(t). You will get an equa...

mehr als 2 Jahre vor | 0

Beantwortet
Error: Incorrect dimensions for matrix multiplication
You set uold = unew, but unew is 30x1 instead of 29x1. Since D(2:N,2:N) is 29x29, MATLAB errors in the next iteration when you ...

mehr als 2 Jahre vor | 0

Beantwortet
Incorrect Dimensions for matrix multiplication
You multiply and divide arrays elementwise when you compute Rtf. Thus you have to use elementwise multiplication (.*) and elemen...

mehr als 2 Jahre vor | 0

Beantwortet
How to use pdist2 command for distance calculation?
If you implement your own distance function for the haversine distance, you can use pdist2.

mehr als 2 Jahre vor | 0

Beantwortet
Empty sym: 0-by-1
Use A = double(arrayfun(@(i)solve(GI(i),V),1:numel(P))) instead of A = solve(GI,V)

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
How to use a constraint on the output of a goal function?
You must ask yourself: How could the objective function become complex-valued ? Maybe you have a log(x) expression in it and the...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Objective function is returning Inf or NaN values at initial point. lsqcurvefit cannot continue.
Before you call lsqcurvefit, you should call your function "func" with the initial guess values for the parameters to see what i...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
NaN Error , while solving Newton Raphson method
@MAYUR MARUTI DHIRDE for i = 2:Nx - 1 J(i, i - 1) = -1 / (2 * dx); J(i, i + 1) = 1 / (2 * dx); end Your loop starts...

mehr als 2 Jahre vor | 1

Beantwortet
Is it possible to solve this differential equation by modifying a given algorithm?
Seems your function to be integrated has a singularity between d/2 and R. Applying "integral" in this case is almost impossible....

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
Assisted Simplification with other equations?
I was told that using the below information that I can simplify eqn to be truely a function of gamma alone Since Q does not app...

mehr als 2 Jahre vor | 2

| akzeptiert

Beantwortet
Shifting an array to create a time delay within a function.
Use dde23 instead of ode23t.

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Is there a possibility to solve this equation numerically using MATLAB?
Please include the code you are using at the moment and critical values for u'(0). Is there any equation for u without the inte...

mehr als 2 Jahre vor | 2

| akzeptiert

Beantwortet
Problem fitting the curve with fminsearch
Using a polynomial of degree 5 to fit your data is a bad idea because the higher the degree, the greater the oscillations betwee...

fast 3 Jahre vor | 1

Beantwortet
Solve a matrix that has nonlinear coefficients
If the coefficients contain the unknowns, a matrix representation of your system of equations leads you nowhere. Write your sys...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
How can I solve this PDE kinetics equation with Symbolic Toolbox?
PDEs cannot be solved with the symbolic toolbox. Use "pdepe" as numerical solver instead.

fast 3 Jahre vor | 0

Beantwortet
Modify the following code to get all the outputs of all Mach number at once
% Gas properties cpc = 1.005; % kJ/kg.K cph = 1.156; % kJ/kg.K gac = 1.4; gah = 1.33; R = 287; % J/kg.K % Fuel QR = 42000...

fast 3 Jahre vor | 0

Beantwortet
How to include zero contour
You want to plot imag(taumin(U,xi)) = 0. Thus use fimplicit: https://uk.mathworks.com/help/matlab/ref/fimplicit.html

fast 3 Jahre vor | 0

Beantwortet
Heat equation using Boundary condition
x=linspace(0,1,20); t=linspace(0,2,10); u=pdepe(0,@eql,@initial,@ba,x,t); surf(x,t,u) title('Surface plot of solution')...

fast 3 Jahre vor | 0

Beantwortet
unable to get code to run please help
This should be the rough structure of the optimization code. But you don't use your optimization variable P in the objective fun...

fast 3 Jahre vor | 0

Beantwortet
¿Cómo puedo hacer el campo de direcciones y resolver el PVI y(0)=1 de la siguiente EDO dy/dx=e^(-0.01xy^2)?
The message means that MATLAB cannot find an analytical solution to your differential equation. You will have to use ode45 to ge...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
how get it?
a = magic(5) b = [1 3 2 4 5] v = arrayfun(@(i)a(b(i),i),1:size(a,2))

fast 3 Jahre vor | 1

Beantwortet
How do you set up an ode solver with a more than one function in the ode?
If you have two unknown functions (f and g), you need two equations.

fast 3 Jahre vor | 0

Beantwortet
dimensions of array being concatenated are not consistent
b = [779.3-780*R(k); 76]; instead of b = [779.3-780*R; 76]; But why do you use such a complicated code for 2x2 linear systems...

fast 3 Jahre vor | 0

Beantwortet
Error using odearguments: returns a vector of length 1, but the length of initial conditions vector is 5.
tspan = [0 100]; SOL0 = [10;0;0;0;0]; [W,SOL] = ode15s(@(w,sol)fun(sol(1),sol(2),sol(3),sol(4),sol(5)),tspan,SOL0); plot(W,SO...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
Automatic substitution of a symbolic variable with a numerical value
The a in the symbolic equation exp = str2sym('c = a + b'); is not associated with the a = 1 in the first line. This would...

fast 3 Jahre vor | 0

Mehr laden