All Questions

Filter by
Sorted by
Tagged with
-1
votes
0answers
22 views

Python scipy NLLS optimization : Parameter estimate hugely off, but the visualisation looks fine

I don't have almost any experience in data modelling so I would really appreciate any input! I have to fit some models to my data - below you see the raw decay, the smoothed version that is actually ...
-1
votes
1answer
58 views

Generating structured paraboloid using gmsh

I am trying to get the structured mesh as shown in the figure. I have used the transfinite surface and curve to achieve the same. Though I get the structured mesh but I do not know how to do for body-...
-1
votes
1answer
36 views

Generating Rvs for a given PDf in python

Two random variables $X$ and $Y$ are distributed according to \begin{align} f_{XY}(x,y)= \begin{cases} x+y & 0\leq x \leq 1, 0\leq y \leq 1 \\ 0 & otherwise \end{cases} \end{align} I ...
-1
votes
1answer
47 views

How to reduce computational time in DDE simulation on Matlab

I need to simulate a network of nodes. The weights of the edges are being given in a matrix . Due to the non-zero distances between the nodes, we consider time-delays, which are computed given the ...
-1
votes
1answer
81 views

ODE45 and a variable that assumes multiple values during the timespan

I have tried in different ways to see what happens to voltage V and gating conductances m, n and h when, at time step x, current I switched from 0 to 0.1, and then at time step x + n it gets back to 0....
-1
votes
1answer
98 views

Implementation of Source Panel Method as Described in Katz Plotkin Book

I am currently trying to implement Source Panel method as described in Katz and Plotkin in Low Speed Aerodynamics. I have successfully implemented two previous methods. However, I am fully blocked on ...
-1
votes
1answer
80 views

plotting $F=K \frac{q_1 q_2}{r^3}$ in python

I tryin to plot the position of electron in the hidrogen atom by Coulomb's law, $F=K \frac{q_1 q_2}{r^3}$ This is mi code ...
-1
votes
1answer
77 views

Numerical solution of the advection equation with Crank–Nicolson finite difference method

I need to implement a numerical scheme for the solution of the one-dimensional advection equation $$\\\frac{\partial u}{\partial t} + C(x, t) \frac{\partial u}{\partial x} = 0 \\\\$$ $$ \\ C(x,t) = \...
-1
votes
1answer
32 views

Automatic selection of the SLE solver and preconditioner during simulation

To simulate the physical process necessary to solve the arising systems of linear algebraic equations. The SLE matrix has a highly sparse form. There are a couple dozen non-zero elements in the string,...
-1
votes
1answer
38 views

Trouble Estimating Motor Parameters with Least Squares in MATLAB

Basically, I'm trying to use Least-Squares to estimate the parameters of a DC motor. My system can be modeled by the following matrix equation: $$\begin{bmatrix}V_{input}(t)\\0\end{bmatrix}=\begin{...
-1
votes
2answers
77 views

Is the sine function periodic in $x$ or $y$?

I know sine is $2\pi$-periodic, but some people say the motion is "periodic in..." Would it be periodic in $y$? If we move along the $x$-axis, the function values $y = \sin(x)$ will repeat, ...
-1
votes
1answer
127 views

Plotting the difference between an exponential and its Taylor expansion as a function of number of terms?

I'm terribly green, please forgive me. I need to plot the difference between a chosen calculated Taylor expansion $e^x=1+x+\frac {x^2}{2!}+\frac {x^3}{3!}+\frac {x^4}{4!}+\frac {x^5}{5!}$... and the ...
-1
votes
1answer
31 views

An almost surly fine-time game of coin toss where you win with probability $p$

Given a fair coin and a number $p\in(0,1)$. How do you design a game that finishes in a finite number of tosses with a probability of $1$? And further, with the probability $p$ you win the game. I ...
-1
votes
2answers
66 views

How to find the relationship between an independent variable in a time series and a single dependent variable

I have a dataset of crop yield of a seasonal crop, under environmental conditions (rainfall, humidity, temperature etc.). Daily environmental conditions are recorded over few years with the crop yield ...
-1
votes
1answer
56 views

Find mass matrix in a system of linear equations

Given $z_t=\sum_{i=1}^t \theta_iz_{t-i}+v_t $, where $t=1,...,N$ where $N=1024$. I need to write this in matrix form (a system of linear equations) as $\mathsf{A}\mathsf{z} = \mathsf{z} - \mathsf{v}$. ...
-1
votes
1answer
106 views

How to get free energy surface of a 3d Ising Spin system using Monte Carlo simulation?

I am doing a Monte Carlo Simulation of the properties of a 3D Ising Spin system. I want to get the free energy surface of the spin system from the simulation. It is a magnetization vs free energy ...
-1
votes
1answer
102 views

Finding derivative of Matrix at different grid points using Finite difference methods/ Cholesky Factorization

I want to code this problem in MATLAB. It would be a huge help if someone can suggest to me how I can approach it. I need to solve the below-highlighted equation, I need ...
-1
votes
1answer
38 views

FORM by NIKHEF: unexpected behavior wrt summation

I have two almost identical FORM (by NIKHEF) scripts here: script_1 script_2 which differ only in summation at the end. In first case the summation in done in one step, in the second case ...
-1
votes
1answer
21 views

Plot sinewave on ZX axis [duplicate]

I am trying to plot a sinewave with a bit of 3d perspective along the ZX axis instead of the XY axis. I have so far been unable to get anything that works, and have been unable to locate any examples....
-1
votes
1answer
51 views

Integrate using Composite Simpson's rule

In a question, we have been given the speed of a car at time t= 0,2,4,6,.......,20 minutes.But it asks us to approximate the distance travelled by the car in 30 minutes using Composite Simpson's rule. ...
-1
votes
1answer
295 views

Recursive Algorithm to Calculate Determinant via Expansion of Minors in C#

I have been recently trying to attempt to write an algorithm in C# that would calculate the determinant of a matrix via recursion using the expansion of minors method. I understand that there are ...
-1
votes
1answer
66 views

Simulating magnetic particles in a field free point generated by two opposing magnets

This is probably a long shot with such a short time, but I've been trying to get theoretical data for a project I'm working on. The project involves using a very simplified version of magnetic ...
-1
votes
1answer
353 views

Finite Element - Flux Calculation

I am solving an advection-diffusion equation using the FEM and am having trouble calculating my fluxes. I start with the equation, $$\frac{\partial n}{\partial t} = \frac{\partial j_{n}}{\partial x}\...
-1
votes
1answer
127 views

Finite element convergence rate and possion's ratio

I am running simulations of a cantilever beam where it is fixed on one end and negative force applied to the other end. The first simulation is with 4-node linear quadrilateral elements and the other ...
-1
votes
1answer
91 views

Writing parallel code for molecular computation [duplicate]

I recently moved towards computational biophysics from an experimental science background. As of now, I am learning the fundamentals and doing some basic monte carlo simulations of LJ fluid on my ...
-1
votes
1answer
25 views

Semi-Definite relaxation of non-linear constraint?

I am implementing an optimization problem using semi-definite approach. One of my constraints is of following form $ trace(A∗X)−(k∗trace(A∗X))+(k∗\sqrt {(trace(B∗X)} )==0$ where k is a constant, A ...
-1
votes
1answer
295 views

Gauss-Seidel method convergence

I am currently programming a code to find the equilibrium function that satisfies the poisson equation in 2D. In order to do this I use finite difference methods and the discrete equation I want to ...
-1
votes
1answer
838 views

Eulerian vs Lagrangian vs Mesh-based vs Meshfree/Meshless methods

Hailing from the scicomp community recently getting into computer-graphics, I have noticed that the scicomp communities talk about mesh-based methods like FDM, FVM, FEM, etc, vs meshfree or meshless ...
-1
votes
1answer
200 views

ODE15s: unable to meet integration tolerances

I have to solve $$\left\{\begin{matrix} \ddot{R}=-\frac{3}{2}\frac{\dot{R}^{2}}{R}+\frac{1}{R\rho}\left [P_{v}(T_{\infty})-P_{0}-a_{1}t^{2}-a_{2}t+\frac{(L\rho_{g})^{2}}{hT_{\infty}}\dot{R}-4\mu \frac{...
-1
votes
2answers
221 views

$LU$ factorization

Our task is to implement a factorization routine that given A in a suitably efficient data structure returns the factors $L$ and $U$ where $L$ is unit lower triangular and $U$ is upper triangular. In ...
-1
votes
1answer
952 views

Gaussian and external basis set. How to write the input correctly [closed]

I have to use the LANL2DZpd basis set. It can be obtained from EMSL Basis Set Exchange. But trying to calculate simple Me2Se molecule : ...
-1
votes
1answer
616 views

Dirichlet boundary condition

I am trying to solve ODEs in matlab using ode15s. Instead of specifying ODEs in the format M * dC/dt = f(C,t) where C is a function of x and t. I want ...
-1
votes
1answer
109 views

solving a non-linear equation with integrals involved

I would like to solve the following equation, wrt $n(e)$ $$f(n(e))=g(n(e)) + \int_{\alpha}^{e} w(n(x))dx $$ The integral there it confuses me. Any suggestion on how I can implement this on a the ...
-1
votes
1answer
849 views

Any note on Immersed boundary finite difference method?

For parts of a talk, I need a note on "Immersed boundary finite difference method", mainly about the reason of appearing this branch in the finite difference methods, considering mathematical ...
-1
votes
2answers
5k views

Confusion Over Navier-Stokes, RANS and URANS in a Flow With Laminar-Turbulent Transition [closed]

I have been working on a transient simulation, using the SST k-w turbulence model in Fluent(TM). An unsteady boundary condition is used: at the beginning of the simulation the flow is laminar and ...
-2
votes
2answers
125 views

Numerically solving differential equations, the domain is very long, [0, +10^6), so the calculating time is very long

Is there any method to deal with this problem? I am using Mathematica to solve the differential equations, but the calculating time is so long because of the large domain $x\in[0,10^{6})$. In fact I ...
-2
votes
1answer
862 views

Understanding and implementing the Fast Fourier Transform

I need to write the fast fourier transform in C++ and I am referring to this formula from wikipedia: But for some reason I am not getting the correct output when I simply enter (1,1) (1,1) (1,1) (1,...
-2
votes
1answer
1k views

explain the difference between 1D Poisson solvers

I compared 2 methods for 1 dimensional Poisson equation solution. One is finite-difference method, "Successive Overrelaxation" from http://www.cs.berkeley.edu/~demmel/cs267/lecture24/lecture24.html; ...
-2
votes
1answer
3k views

How do you install a binary R package?

I need instructions on how to install a binary package in R.
-2
votes
2answers
85 views

numerical solution for differential equation

I have these 3 equations and i want to solve them with numerical methods. so I am using scipy library but I don't know how to solve 3 equations together. R, g, sigma and density are constants. \begin{...
-2
votes
1answer
753 views

Solving Schrodinger equation numerically

Here is the Schrodinger equation that is to be solved: A 1D hard wall potential in $[0, 1]$. The potential within the potential well is given by a linear combination of Gaussian dips $$v(x) = - \...
-2
votes
1answer
76 views

R language - how to list variables in use [closed]

How can I generate a list of all the variables that have been assigned in an R language session?
-2
votes
1answer
42 views

Solving differential equation by setting vectorization `on` in MATLAB

This is a follow up to my previous question posted here. I've set up an ode system in MATLAB and I'm trying to vectorize the code to increase the speed of computation. The follow is the code for my ...
-2
votes
2answers
135 views

Ways to solve numerically differential equations in C [closed]

I have to solve numerically a differential equation in C. The equation is: How can I write some code to solve it? Are there some numerical methods (Runge-Kutta maybe?) to solve it? A colleague ...
-2
votes
1answer
305 views

Multi-objective optimization problem - Euclidean space

I am looking for some clues for an optimization problem. My problem consists of arriving to a image by optimizing multiple layers with the pixel position probability. This is an overview of the ...
-2
votes
1answer
62 views

How to get 10 in computer science, using the number 4 exactly four times, and two signs exactly and two operation + exactly? [closed]

How to get 10 in computer science, using the number 4 exactly four times, and two signs exactly and two operation + exactly ?
-2
votes
1answer
73 views

Forward Euler Adaptive Step Size Stability

Given with a generalization using adaptive times-stepping as then is it still reasonable to assume that to ensure stability of the Euler’s forward method we need the growth factor for all n to be ...
-2
votes
1answer
90 views

How to : numerical integration by quadrature in C language / remove NaN

What I wanna solve it the problem following ( by quadrature method ) I want to get two arrays of data ( z & tau ) from z[0], tau[0] to z[2249], tau[2249]. Since the integrand diverges at z=0.9, ...
-2
votes
1answer
310 views

Adding Non-Linear source term to 2d Implicit MATLAB code

I'm running out of time for this code so any help would be greatly appreciated. I am currently coding the 2D heat/diffusion equation in matlab but i'm having trouble adding in the source term. my ...
-2
votes
1answer
392 views

Comparison between CashKarp Method and Dormand Prince Method - Runge Kutta Method

Can Cash Karp Method be used for integrating a nonsmooth solution ?. Because Dormand Prince method gives an error while integrating nonsmooth solution How can nonsmooth function can be integrated? I ...

15 30 50 per page