Community Profile

photo

Torsten


Last seen: Today Active since 2013

Statistics

  • Most Accepted 2022
  • Explorer
  • Master
  • 36 Month Streak
  • Revival Level 2
  • Knowledgeable Level 5
  • First Answer

View badges

Content Feed

View by

Answered
not enough input arguments help in line 6 please explain why.
Works (see above). The list of input arguments to your function in the call to ode45 was wrong. [v,x] = ode45(@(v,x)ch6(t,x),v...

9 hours ago | 1

| accepted

Answered
The return value of the objective callback function must be a real double scalar.
Looking at your objective function, it seems it it returns complex values. This will make MATLAB error - you cannot minimize a f...

14 hours ago | 0

Answered
Solving a system of 6 DAEs of first order - index error
The reason why it doesn't work is that you don't have an equation that directly solves for y. Equation (1) solves for w, equati...

14 hours ago | 0

| accepted

Answered
Please help me with this qustion
syms v1 vo = 4/10 + v1 eqn1 = v1/10 + (v1-60/20) + v1-5*vo/20 ==0 v1_sol=solve(eqn1, v1) vo_sol = subs(vo,v1,v1_sol)

14 hours ago | 0

Answered
How can I correct this error "Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters"?
Maybe [t,y] = ode45(@equfunc,[0 200],1); plot(t,y) Look at the examples provided in the documentation of ode45: https://uk....

16 hours ago | 0

Answered
Can't solve the equations
You must tell us which solution you want. syms pb pg sb = 1; ds=0.25; dm=0.2; k=1; sg=1; m=0.01; r=0.06; f=0.075; ms=0...

1 day ago | 0

Answered
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)...

1 day ago | 0

Answered
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...

1 day ago | 0

Answered
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'...

1 day ago | 0

| accepted

Answered
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...

2 days ago | 0

Answered
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 ...

2 days ago | 1

Answered
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...

3 days ago | 0

Answered
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 ...

3 days ago | 0

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

3 days ago | 0

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

3 days ago | 0

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

3 days ago | 0

| accepted

Answered
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...

4 days ago | 0

Answered
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...

4 days ago | 0

| accepted

Answered
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...

4 days ago | 1

Answered
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....

5 days ago | 0

| accepted

Answered
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...

5 days ago | 2

| accepted

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

5 days ago | 0

| accepted

Answered
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...

5 days ago | 2

| accepted

Answered
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...

6 days ago | 1

Answered
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...

6 days ago | 0

| accepted

Answered
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.

6 days ago | 0

Answered
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...

6 days ago | 0

Answered
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

7 days ago | 0

Answered
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')...

7 days ago | 0

Answered
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...

7 days ago | 0

Load more