Question

How to control the outcome of an ODE?

Hi everyone, I have a system of ODE's that I solve by a ode15s solver. That all works fine, however, I want to try to controll ...

3 months ago | 1 answer | 0

Question

How to vary a variable in a system of ODE's?

Hello everybody, I want to make a plot where I from where I can find and show the best value for a parameter. In order to do th...

3 months ago | 1 answer | 0

Question

How to add values in matrix if in a conditions is met?

Hey everybody, I'm processing some data and i'm stuck at the moment. I have a matrix consisting of 2 columns and about 4000 ro...

6 months ago | 2 answers | 0

Question

How to make a heat map using three variables?

Hey, I have an equation calculating the concentration depending on 2 variables (r and theta). I want to make a plot of r vs. th...

8 months ago | 1 answer | 0

Question

Is it possible to use outcomes of functions in another script, without running that function first?

Hello, I had a question about functions. I've a lot of equations and the outcomes of some equations are needed for other equati...

1 year ago | 1 answer | 0

Question

How to optimise this equation?

Hey, I have the following equation and I need to optimize this to find the best value for n: Furthermore, I have the followi...

1 year ago | 2 answers | 0

Question

How to integrate this function correctly?

Hey, this seems like a rather simpel problem but I don't seem to get it right. I'm given the following integral: = and the ...

1 year ago | 1 answer | 0

Question

How to calculate the rate using a given data set?

Hey guys, I need to estimate the reaction rate from given data in excel. To answer this I set up the differential equations and...

2 years ago | 1 answer | 0

Question

Set up a function corresponding to this graph

hi, the following sketch was given to me and i need to set up a corresponding function. One problem, i have absolutely no clue, ...

2 years ago | 2 answers | 0

Question

How to solve this system of ODE's

Hi i have a rather simple question, I need to solve a system of ode's of the form Ax = b with given A and timespan and interval....

2 years ago | 1 answer | 0

Question

How to estimate coefficients for a system of ODE's?

Hi guys, I need some help with how to process the code in matlab. I have set up a system of ODE's, got the initial values and ha...

2 years ago | 1 answer | 0

Question

Integrate with Simpson's Rule

Hi i have, probably an easy, problem. I made a function (see the outcome below) and i need to integrate the outcome, but since t...

2 years ago | 1 answer | 0

Question

How to solve a 2D PDE with backward Euler?

Hi, i have to solve the 2D heat equation: ∂T/∂t = α∇^2 T = α(∂^2T/∂x^2 + ∂^2T/∂y^2) It is given that at the 4 boundaries the...

2 years ago | 1 answer | 0

Question

How to get a value from a matrix?

Hi guys, I have a question that on the first glance seems really simple. I have a matrix of 2 columns and I have a value of the ...

2 years ago | 1 answer | 0

Question

How to create a function that lets me choose the output (euler,Rk2 or Rk4)?

Hi guys, I have made an Euler solution, an RK2 and an RK4 solution for the same differential equation and now i want to put thes...

2 years ago | 3 answers | 0

Question

From rk-2 to rk-4

Hi, I have a problem. I have written the following code for a Runge Kutta 2 but now i want it write a code for a Runge Kutta 4. ...

2 years ago | 1 answer | 0

Question

Matlab doesn't save the new variable to the Workspace?

Hi, I have written a code that needs the number of rebounds of moving particles in a 2D box, now I needed to count the number of...

2 years ago | 1 answer | 0

Question

How to change a value in an array when a condition is met?

Hi, I have the following array: Velocity = [x, y, velocityx, velocityy] Velocity = 2 9 -1 -1 2 3 ...

2 years ago | 2 answers | 0

Question

How to plot the curve of diffrent outputs?

I have written my code and want to plot a curve of N vs D, but the outcome of my code isn't one array it are diffrent arrays. So...

2 years ago | 1 answer | 0

Question

How can I repeat the code for multiple timesteps?

Hi, I need to write a code to let a particle move multiple timesteps, where the timesteps can be any number (e.g. 2 or 50). The ...

2 years ago | 1 answer | 0

Question

Replace a value if a condition is met

Hi, I got a little problem and I hoped someone can help me out. When I have a matrix consisting of 3 columns, I want to replace...

2 years ago | 1 answer | 0