Questions tagged [modeling]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
206 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 (...
schlenkline's user avatar
2 votes
1 answer
173 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 ...
Physkid's user avatar
  • 670
4 votes
2 answers
364 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: ...
wlf112's user avatar
  • 43
2 votes
1 answer
426 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 ...
CAF's user avatar
  • 510
4 votes
2 answers
942 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 ...
Mike Meyers's user avatar
9 votes
2 answers
656 views

Why does NonlinearStateSpaceModel linearise?

The documentation for NonlinearStateSpaceModel says: In NonlinearStateSpaceModel[eqns, ...] the Taylor linearization is with ...
CarbonFlambe's user avatar
  • 1,234
0 votes
0 answers
160 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 ...
user305883's user avatar
0 votes
1 answer
206 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 ...
bicarlsen's user avatar
  • 295
-3 votes
1 answer
386 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; ...
PureLine's user avatar
  • 1,290
1 vote
0 answers
196 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 ...
NotDowloadable's user avatar
4 votes
0 answers
121 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 ...
NotDowloadable's user avatar
4 votes
0 answers
413 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/...
E3labs's user avatar
  • 475
3 votes
1 answer
179 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 (...
Volker's user avatar
  • 109
5 votes
1 answer
239 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 ...
OllieNeedsHelp's user avatar
2 votes
3 answers
398 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 ...
user982962's user avatar
8 votes
2 answers
507 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/...
AzJ's user avatar
  • 667
1 vote
1 answer
165 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 ...
Alessia T's user avatar
3 votes
1 answer
173 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}...
Aritra Saha's user avatar
41 votes
5 answers
15k views

My Girlfriend is going to prison...Save her with Math

Salacious title, but true story. ...
Prisoners Dilema's user avatar
1 vote
1 answer
1k 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 ...
CharlesBouwer's user avatar
4 votes
2 answers
843 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 ...
user45561's user avatar
0 votes
2 answers
198 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, ...
LBogaardt's user avatar
  • 1,565
22 votes
1 answer
2k 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 ...
Sjoerd C. de Vries's user avatar
4 votes
2 answers
11k 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), ....
L_R_T's user avatar
  • 43
0 votes
2 answers
261 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 ...
SKZagreb's user avatar
  • 103
5 votes
1 answer
406 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 "...
user170231's user avatar
  • 1,581
0 votes
1 answer
176 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,...
user1886681's user avatar
15 votes
1 answer
532 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, ...
HJensen's user avatar
  • 517
3 votes
1 answer
143 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 ...
amasics's user avatar
  • 249
2 votes
1 answer
630 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 ...
firegreencurry's user avatar
0 votes
2 answers
150 views

Solving ODE's on Mathematica [closed]

I'm having trouble solving a system of ODE's on mathematica. Any help would be appreciated ...
user avatar
2 votes
0 answers
238 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: ...
Django's user avatar
  • 21
1 vote
1 answer
241 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 ...
cmm0052's user avatar
  • 195
21 votes
1 answer
1k 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 ...
Pinti's user avatar
  • 6,453
7 votes
2 answers
507 views

Sound synthesizer using Manipulate

Sound synthesizers, both digital and analog, often include a parameter section for shaping the amplitude of a sound wave over time. This parameter section is commonly known as an "ADSR EG" (attack, ...
useranonis's user avatar
1 vote
1 answer
2k views

Multivariable non-linear fitting

I have a function called "C" that I know it depends on 6 variable. I have a set of data points, 6 rows by 9 columns, in which in each row only one variable is changing and the rest of the variables ...
HaneenSu's user avatar
1 vote
1 answer
144 views

How to make this model in wolfram mathematica?

A model production possibility curve (nonlinear case). I used 1/4 of a circle in the code. ...
Karina  Raspberry's user avatar
4 votes
1 answer
126 views

Recycle boundary condition

I'm having the following issue that can not find a solution , by using this boundary condition u[0, t] == 2 u[1, t] that Mathematica does not understand, someone ...
Jeiveison Gobério Maia's user avatar
1 vote
2 answers
313 views

Determine the initial speed and launch angle of a projectile from its trajectory

I have the coordinates {x,y} needed to plot the trajectory of a projectile, which are given below: ...
Nabil's user avatar
  • 493
4 votes
0 answers
567 views

How to do multi-agent modeling?

There are tons of examples here: http://demonstrations.wolfram.com/topic.html?topic=multi-agent+modeling&limit=20 But I been unable to find a good guide explaining what is the recommended ...
Luxspes's user avatar
  • 898
1 vote
1 answer
361 views

Phase Portrait to Differential Equation [closed]

I posted this question on Math.SE and have received a satisfactory answer in the context of that website. I am re-posting it here to get input from Mathematica users. Why would I receive a different ...
dearN's user avatar
  • 5,301
3 votes
1 answer
593 views

Generate a simulated covariance matrix

I am working on a problem where one of the input variables is the level of covariance between the entries in a particular matrix. To simulate this problem in Mathematica, I will need to feed my code ...
Sprog's user avatar
  • 169
4 votes
2 answers
250 views

Comparison between numerical solution of nonlinear ode and nonlinear ode of second order

Background Let's consider the following initial value problem for nonlinear system $$ \begin{cases} E' &=& 1 - n_e, \\ n_e' &=& -8\,n_e\,E, \end{cases} \tag{1} $$ with the following ...
Oleg Kravchenko's user avatar
4 votes
2 answers
933 views

FindFit and NMinimize to fit a parametric model (minimize the distance of two curves)

I am trying to find a fit to the cumulative distribution of a set of points using FindFit or NMinimize. In particular, I would like to find the parameters of the cdf of the Beta Distribution that ...
Kass's user avatar
  • 661
1 vote
1 answer
710 views

How to simulate Multifractional Brownian Motion?

The maximum I would ask, is hints, how to model MFBMotion. Link to paper Firstly, i wanted to simulate in MATLAB that code: ...
lyrgo ft's user avatar
1 vote
0 answers
68 views

Can I model the general political landscape with mathematica? [closed]

I want to develop a website which would model a province of 2 million people from a political point of view. Is mathematica a good fit for such a project? My background is that I'm an experienced ...
Wil's user avatar
  • 111
6 votes
1 answer
613 views

Problem exporting and re-importing STL file

I wrote all code and there're no errors in code. Result of code is like first picture(left). But I can't Import that structure. The result of import stl file is second one(right one). How can I import ...
유민우's user avatar
  • 105
1 vote
2 answers
583 views

Transposition of state space form of a transfer function

How can I transpose the output of state space model in Mathematica? trying the following code would transpose the top right symbol s instead of the matrices. ...
ar2015's user avatar
  • 121
3 votes
1 answer
435 views

Extract Transfer Matrix from TransferFunctionModel

I have a MIMO transfer function model, and I'd like to know how to perform arithmetic on this model. For instance, to see the difference between two systems' outputs for arbitrary inputs, I'd like to ...
Ben Criger's user avatar
2 votes
0 answers
878 views

Solution to heat equation with Neumann boundary conditions and lateral heat loss

I am conducting an experiment on heat conduction in a copper rod. To do so I am using a thin copper rod with several temperature probes, then I am going to compare the data with a solution to the heat ...
daniel17027's user avatar