Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [modeling]

Questions about approaches for simulating physical systems or phenomena by building from related understanding and basic principles.

1
vote
1answer
55 views

Estimating parameters on system of differential equations

I am looking for some help estimating the parameters of a series of differential equations to assist fitting the experimental data I have collected. The Problem: The equations are based off of the ...
1
vote
1answer
70 views

Speeding up the calculations by Reduce and NSolve

I have a non-linear system of equations with numeric parameter values as shown below. I first tried FindRoot with given initial values and it did not converge. Then ...
3
votes
0answers
120 views

Physics based predictive model using Predict

Summary: The first order response of a block of metal quenching in a fluid (or a cold block heating in a warm environment) is well known. I am trying to create a physics based predictive model for ...
2
votes
1answer
59 views

Fitting data with 3 linear fits

I have a dataset that can be easily approximated by a piecewise function composing of 3 linear functions, but i am unable to get an accurate fit once the third linear function is required. The model ...
0
votes
1answer
243 views

Solving Differential Equation System for HIV Treatment Model

I was working on a project about optimal strategies for HIV treatment, models used from [Butler, Kirschner, and Lenhart] 1997. This model explains the spread of HIV viruses in the human body, where ...
0
votes
1answer
38 views

Fit data with a given function depending on parameters

I want to fit the data of a star's temperature with a function from a model. That function depend on several parameters. I want to know how can I find the value of those parameters. The data is: <...
0
votes
1answer
86 views

Model fitting for concave curve: test if asymptote or convergence exist

I am asking a double check if conceptually I set up proper model and proceeding in good direction to drive conclusions. I have a distribution that looks like this: I want to test if for increasing x ...
13
votes
1answer
550 views

Speed up NDSolve compared to Python (calls to LSODA)

I migrated a numerical model code from Python to Mathematica and am surprised how much faster the Python version runs. Profiling of the Python version tells me that it is about 100 times faster (120 ...
2
votes
3answers
120 views

Fitting two equations to diferent parts of the same dataset

I have a system that transit between two different states. Each state output varies linearly with time, given by $m t+c$, where both lines intersect the $x$ axis in the same point. The output of this ...
0
votes
1answer
76 views

Finding the limit of a function

I have the following code: ...
1
vote
1answer
66 views

Infinite potential, prevent value to go beyond zero, initial value problem

How do you make a wall potential in Mathematica. Meaning : I want my potential to have a wall at 0 : $ U(x)=\left\{ \begin{split} & x>0 : U(x) = f(x)\\ &x=0: U(x)=U_0 \\ & x<0: U(x)=...
1
vote
1answer
137 views

How to plot a trajectory of Lorenz attractor system model (SystemModelSimulate - v11.3)

I'm using one of the system models provided with Mathematica 11.3. (I found it by evaluating SystemModelExamples[].) ...
0
votes
2answers
72 views

Difficulties in compiling the steady state of a biological model

I am modeling the yellow fever for an EDO system, in which I have to find the stationary states of the system, and I have great difficulty in finding something that can be very simple. I put the ...
38
votes
1answer
894 views

In what way can M11.3's system modelling features be used by those who don't have SystemModeler?

Mathematica 11.3 includes some functionality from SystemModeler, but not the full SystemModeler environment. I assume that most people here are familiar with Mathematica, but not SystemModeler, or ...
0
votes
2answers
474 views

How can I fit a differential equation to experimental data?

I would like to add a fit to the following data. Here is the differential equation I am using. g=9.81 l=0.2 m=0.09 ...
9
votes
1answer
516 views

Can I use a differential equation as a model to make a fit to experimental data?

I've done an experiment where I swung a pendulum under air resistance. Is it possible to model the data using the following differential equation and find a b-value? ...
1
vote
0answers
57 views

Dealing with Vector Outputs from ItoProcess, RandomProcess (Stochastic Differential Equations)

I'm modeling stochastic chemical kinetics and the ItoProcess[] function has served me well. I am trying to write an efficient code to analyze many (Paths) trajectories of several different reagents (...
2
votes
1answer
111 views

determining solution to PDE with Mathematica

Bug introduced in or after 10.3, persisting through 11.2. It's been a while since I have touched separation of variable and not too keen to "get my hands dirty" if I may avoid it. The given PDE is ...
3
votes
2answers
163 views

Solving ODEs with ParametricNDSolve and fitting parameters to data (Not a list of real numbers)

I saw some similar posts here, but none of them gave me a solution. I have this set of data: ...
2
votes
1answer
147 views

Caclulate second partial derivatives of a numerically defined function

I am performing a chi square minimisation with respect to some parameters x,y,z that are themselves part of the kernel involved in a numeric integral. I therefore ...
3
votes
2answers
191 views

Is it possible to find the transfer function of these three differential equations using Mathematica

Imagine you are attempting to obtain a model of a device with two inputs [u1, u2] and three outputs [O1, O2, x] from the Lagrangian. After some of Lagrangian work, you find the following three ...
7
votes
2answers
501 views

Why does NonlinearStateSpaceModel linearise?

The documentation for NonlinearStateSpaceModel says: In NonlinearStateSpaceModel[eqns, ...] the Taylor linearization is with ...
0
votes
0answers
116 views

Help to model fitting a distribution of weights in weighted graphs : power or exponential law?

I found this post https://math.stackexchange.com/questions/164436/difference-between-power-law-distribution-and-exponential-decay useful, but not sufficient for me to understand which law may best ...
0
votes
1answer
143 views

Random placement of non-overlapping disks

I am trying to create a Monte Carlo simulation for a physical situation. The situation is a layer of disks are lying on a plane. The disks have a known mean radius and standard deviation, and a known ...
-3
votes
1answer
256 views

How to approximate the data curve with a function? [closed]

I want to approximate a data curve (the purple curve in the picture) with one function, so I can use it in my engineering simulation. Some explanation of purple curve The curly part is a sinusoid; ...
1
vote
0answers
139 views

2D Electro-diffusion Model with NDSolve

Set Up I am attempting to make a 2D model of the diffusion of ions in solution due to concentration gradients and an electric field. The equation that needs to be solved to describe the diffusion is ...
4
votes
0answers
90 views

Implementing a model of electro-diffusion [closed]

I am an undergraduate researcher. I have been working with Mathematica for roughly a month. I have been assigned a modeling task. My objective is to model the diffusion of ions in solution under the ...
3
votes
0answers
160 views

Power law fitting package that optimizes fitting parameters based off of the KolmogorovSmirnov MC method

I'm exploring power law fitting and would like to get to a point of making a power law package like what was discussed in this post, where OP references the R poweRlaw package. As per the comments/...
3
votes
1answer
96 views

How to compute “SinglePredictionConfidenceIntervalTable”-Values on validation data with NonlinearModeFit?

When I perform a NonlinearModelfit I get a FittedModel object and I can see the values of the property "SinglePredictionConfidenceIntervalTable". Now I apply the FittedModel object on a new data case (...
4
votes
1answer
158 views

How to use FindFit to optimize parameters of a WSM model via WSMLink for a parametric curve

I have I-V (current-voltage) data which I am trying to use to calibrate a PV solar cell model in WSM using WSMLink from mathematica. I am using the FindFit function which simulates the model with each ...
0
votes
3answers
136 views

Reduce (or Solve) a set of inequalities assuming some independent variables are unbounded

First a summary of the general problem I'm trying to solve: I want to get a set of inequalities for a very complex function (If you are interested is the no-arbitrage conditions Black-Scholes equation ...
8
votes
2answers
423 views

Use a picture as the initial distribution of an agent based model

I am trying to make an agent based model similar to http://demonstrations.wolfram.com/DiffusionLimitedAggregationARealTimeAgentBasedSimulation/ http://demonstrations.wolfram.com/...
1
vote
1answer
127 views

Creating an Interactive Module that plots a graph and a highlighted vertex

For an assignment, I have to do the following: Build an interactive model with two controls, n and u, that generates a random ...
3
votes
1answer
165 views

Local optimization of parameters in a Coupled Non-Linear System

I have a system of differential equations : $\frac{dX}{dt} = (0.8+0.4c_{1})X-(0.007+0.006c_{2})XY$ and $\frac{dY}{dt} = (0.048+0.004c_{3})XY-(0.4+0.2c_{4})Y$ where $0\le c_{i}\le1$. Varying $c_{i}...
41
votes
5answers
15k views

My Girlfriend is going to prison…Save her with Math

Salacious title, but true story. ...
1
vote
1answer
659 views

How do I properly use Sow and Reap within a Do loop?

The problem is that reap only returns one value when I was expecting a string resulting from Do. For context: This is a simple democratic deficiency model. Where m is the number of periods, n is ...
4
votes
2answers
477 views

Non-linear-Model-Fit problem in mathematica

I have written the following code to fit the function g2 to data (a,b,c,d) but I don't realize where I have made a mistake,without ...
0
votes
2answers
131 views

Can NonlinearModelFit be used instead of TimeSeriesModelFit without loss of generality?

I am trying to model sales seasonality. As I am unfamiliar with TimeSeriesModelFit[], I am using NonlinearModelFit[]. However, ...
17
votes
1answer
890 views

Backtesting a Probability of Default (PD) model

Background PD models Financial institutions use Probability of Default (PD) models for various purposes such as client acceptance, provisioning and regulatory capital calculation as required by the ...
3
votes
2answers
5k views

Curve fitting using an asymmetrical sigmoid function

This is probably going to sound trivial, as I am new to Mathematica and still busy reading the Getting Started materials. I have a series of observations: [(duration, speed sustained for duration), ....
0
votes
2answers
218 views

From the data the growth of tumor spheroids determine doubling time using Mathematica and by hand

Task: From the data the growth of tumor spheroids determine doubling time Link to the data. My idea was to use least squares method and Mathematica to helps me find result. But I think that this is ...
5
votes
1answer
241 views

Manipulating 2D graphics along the surface of a 3D sphere according to their centroids' latitude/longitude

I'm trying to make an unsophisticated 3D model of a continent's path on a globe consisting of snapshots of the planet surface that follows the historical trend of continental drift. By "...
0
votes
1answer
152 views

Help Modeling Average Of A Gaussian And A Function

I am trying to recreate some results from a simulation that I have but I am having trouble re-creating the expressions/funcitons in mathematica. In my simulation I have a data set consisting of (z,x,...
14
votes
1answer
338 views

Implementing the Biham–Middleton–Levine traffic model as CellularAutomaton

In an attempt to understand how to make rules for CellularAutomaton[], I set out to try to implement the Biham–Middleton–Levine traffic model. It is a 2D, ...
2
votes
1answer
108 views

How to model a two-phase motion with Manipulate

I was trying to use Manipulate to model a simple two-phase motion. In the first phase, a cart moves on a track in one-dimension with a certain acceleration and velocity. Then in the second phase, the ...
2
votes
1answer
378 views

plotting and manipulate plot for logistic model (recursive function)

For a larger project on chaos, I am trying to write a short program that graphs the logistic model with different constant values, in this case the constant being "r". A) Is there a way to use Table ...
0
votes
2answers
146 views

Solving ODE's on Mathematica [closed]

I'm having trouble solving a system of ODE's on mathematica. Any help would be appreciated ...
2
votes
0answers
187 views

Modelling heat exchange between flowing fluid and surroundings

Starting from this question: Couple a PDE and ODE in NDSolve I would like to modify the fluid from static to a flowing one in the y direction. that's the original code that I modified a little bit: ...
1
vote
1answer
178 views

Why is NonLinearModelFit giving me a (significantly) more accurate result than LinearModelFit for a linear model?

I am working with a fairly large dataset, and at one point I need it to be fit to a complicated model (along the lines of ...
17
votes
1answer
757 views

Couple a PDE and ODE in NDSolve

I would like to solve an example of non-stationary heat transfer with a coupled PDE and ODE. Let's assume that we have 1 dimensional bar of length $L$ with uniform initial temperature. The right end ...