Question

Piece-wise Functions in 3 Dimensional Differential Equation Solver

Hello, I want to implement a piecewise function as a part of a differential equation. I was looking at previous posts on this i...

18 jours ago | 1 answer | 0

Question

Error "using symengine>@()0.0" in ODE Solver

Hello, I restarted everything I did from scratch and in the most simpliest way possible to recreate the same error I get in m...

24 jours ago | 1 answer | 0

Question

ODE Error: "Array indices must be positive integers or logical values"

Alright I managed to simplify this down to the most basic I can. I am getting an error in my ode set: Index in position 1 is in...

28 jours ago | 1 answer | 0

Question

Matlab Ignoring Half of Equation When Solving ODE

Hello, I am trying to solve the Lorentz Force differential equation set in 3 space, however I am currently omitting the magneti...

29 jours ago | 0 answers | 0

Question

Cannot Plot Multiple Functions on Same Graph

Hello, I am trying to plot two different Maxwellian functions on the same graph. The only difference between them is that one h...

environ un mois ago | 1 answer | 0

Question

Plot Legend Command Does Not Work

Hello, I am trying to put the legend for a 3D plot inside the plot (upper-right hand corner) but it refuses to do so even when ...

3 mois ago | 0 answers | 0

Question

Error: Cannot set support to 'positive' with non-positive data.

I continue to get the following error with my code: Error using mvksdensity>compute_finite_support (line 274) Cannot set suppo...

4 mois ago | 1 answer | 0

Question

"Error using symengine>@()0.0 Too many input arguments."

I continue to receive the following error: Error using symengine>@()0.0 Too many input arguments. Error in bdipuniodefun (l...

5 mois ago | 0 answers | 0

Question

ODE Solver Freezing Up

Hi, I tried using ode15s to solve a trajecotry solution and what is so odd here is that the solver exponentially becomes slower...

5 mois ago | 0 answers | 0

Question

Matlab Cannot Find Functional Inverse

Hello, I have this code and want to find the inverse of the defined function, however Matlab says it is unable (Error below) and...

8 mois ago | 1 answer | 0

Question

ODE Solver Running Very "Slowly"

Hello, I am using an ODE solver inside a for loop to run trajectories of particles in a magnetic field, however whenever I run ...

8 mois ago | 2 answers | 0

Question

How to Generate a Random # Between -1 and 1?

Hello, I have a simple question. I want to produce a random number between -1 and 1 as the title states. I tried doing this alr...

10 mois ago | 1 answer | 0

Question

What does this ODE error mean?

Hello, I don't understand why I am getting the following error: Error using odearguments (line 87) The entries in tspan must ...

10 mois ago | 1 answer | 0

Question

Discritizing an ODE Solution

Hello, I have a conceptual question to ask. Say I want to utilize the ode15s function to solve a system of coupled differential ...

11 mois ago | 0 answers | 0

Question

For Loop Significantly Increases Run Time of Script

Hello again! For this ode solver, I am trying to tell it to solve a system of equations for every time step in my for loop. The ...

11 mois ago | 0 answers | 0

Question

How to pull specific data from solution set?

Hello, I am using this ODE solver and I am trying to figure out how I can reference the velocity components of the matrix of sol...

11 mois ago | 1 answer | 0

Question

How to Use Symbolic Functions in For Loops

I would like to use a symbolic function in a for loop, however I spent hours reading the resources about symbolic functions and ...

12 mois ago | 1 answer | 0

Question

How to orientate and specify geometry location in a 3D plot?

I have this script and I am plotting a magnetic field of a cylindrical magnet. I am trying to import a cylinder using the PDEs t...

environ un an ago | 0 answers | 0

Question

Referencing Arbitrary Functions from other Script Files to Solve System of Equations

CODE UPDATED: I am re-asking this question and this time giving all the context so that those reading this will better unders...

environ un an ago | 1 answer | 0

Question

How do I create an arbitrary function that can be referenced in another script correctly?

I am trying to create an E-field of a sphere with a known radius and potential that has been induced on it. Here is the code I a...

environ un an ago | 0 answers | 0

Question

Solving a System of ODEs

My Input: syms x(t) y(t) z(t) %Units of kg and seconds q = 1.60217662*(10^-19); B = 2; m_e = 1.60217662*(10*-31...

environ un an ago | 1 answer | 0

Question

How can I fix "Not Enough Input Arguments" error in this Script?

Input: t = 0:pi/50:10*pi; x = (1/2)*(sin(2*t))+1; y = (1/2)*(cos(2*t))+1; z = 2*t; plot3(x,y,z,t,'r','LineWid...

environ un an ago | 1 answer | 0