# Questions tagged [equation]

A statement that the values of two expressions are equal indicated by the sign = .

1,497 questions
0answers
8 views

### how to use equivalent equations in network flow

In this image, how does it change like that after equivalent equations?
0answers
27 views

### scipy fsolve fails for higher range of values whilst finding roots of equations

I am using scipy.optimize fsolve for finding roots of two equations. fsolve works well for some range of b values (0.1 to 0.6), but fails for values like 0.9 or 0.99. I have tried moving to ...
0answers
39 views

### Solve an equation with three variables in python? (only one equation available)

I want to solve the below equation using Python and any possible Library. y = c / ((x-α)^β) Variables are: α, β and c. I know this equation may have many possible answers, I want to calculate all ...
2answers
35 views

### How to solve set of equations for two unknowns using R?

I have two equations. They are as follows: ( 1 - 0.25 ^ {1/alpha} ) * lambda = 85 ( 1 - 0.75 ^ {1/alpha} ) * lambda = 11 I would like to compute the values of alpha and lambda by solving the above ...
1answer
35 views

### Counting consecutive occurences in dataframe based on condition

I am trying to find whether 3 or more occurences of any consecutive number in a column are present, and if so mark the last one with a 1 and the rest with zero's. df['a'] = df.assign(consecutive=df....
1answer
51 views

### Solve nonlinear equation

I am having some problems with my function code. The main idea is to get parameter SI (main unknown) in which the equation Q_cal-Q=0. Can somebody help me? Thanks a lot. P=1.94; Q=1.09; P5=1.08; fc=...
2answers
34 views

### How to convert this equation to Octave code and plot

I have an equation that I created on Desmos website I used the code below to try and recreate it in Octave. But when I plot it, it comes out different. How can I fix the code in Octave (without ...
1answer
39 views

### Inequality constraints in system of equations with fmincon (Matlab)

I need to solve a system of 44 equations with 44 unknowns (x) of the following form (-1/(1 - x(t))) + (phi(t) * (1/T) * Σ_{h=45}^{60} β^{h-t})) = 0 where phi_t takes value 0 for t <= 25 and value ...
0answers
24 views

### Am I implemented Single diode model correctly?

I need to confirm if I have translated the following equation (image below) correctly to programmatic code format (Visual Basic 6). It is an equation for the 1 diode model of a PV solar cell. (...
1answer
23 views

### How to solve systems of matrix equations in Python?

I have to solve system of matrix equations such like: variable (matrices) : X1,X2,X3,X4,X5 constants(matrices) : others X1 = R*(A+BX2+DX3+DX4+EX5) X2 = R_2*(A+BX1+CX3+DX4+EX5) X3 = R_3*(A+BX1+CX2+...
1answer
31 views

### SymPy: how can i get the partial derivatives of one equation input beforehand by the user?

Im trying to build a constrained optimization calculator in python using the sympy module. The idea is that a user can enter two functions, "f" and "g", which then are put together to form the ...
1answer
21 views

### Revert MinMax scaling with 2 overlapping lists

Following my question here: Revert MinMax scaling, I'm trying another approach. This time, I have 2 big lists: [ ...many values, 0, 20, 22, 32, 11, 24, 0, 12, 11, 33] [26, 25, 34, ...
1answer
28 views

### Revert MinMax scaling

I have an array of value (percentages) scaled from 0 to 100: [34, 34, 84, 28, 56, 56, 0, 0, 100] I know that these values have been scaled with a MinMax scaler: V = (actual - min) / (max - ...
0answers
27 views

### How to solve the Math Processing Error in jupyter notebook

I used the jupyter notebook for my data analysis in python for my daily job which is set up through the Anaconda. I can conveniently use it in general. Recently, I have an attempt to copy the equation ...
1answer
26 views

### Want to display fitting equation in Python

I am fitting data with an equation and I would like to display that fitting equation. the following doesn't seem to display y_equation (everything else works). Ideas? data = np.loadtxt("datafile.dat"...
1answer
42 views

### Sympy Eq() behaviour and Sympy general usage

In sympys Eq(lhs,rhs) one can instantiate an equation. However I am really really wonderin about it's behaviour and would like to ask how this equation type is intended to be used! The reason I'm ...
1answer
40 views

### Solve complex matrix equation

I have a complex equation involving matrices: R = expm(X)*A + (expm(X)-I)*inv(X)*B*U; where R, B and U are known matrices. I is an identity matrix. I need to solve for X. Is there any way to ...
0answers
35 views

### How to collect a value from an external ListView and use it as a condition to populate a new ListView column?

This one is a little hard to explain but I'll do my best. I'm trying to read a Payable value (fortnightly, monthly or yearly) from my ListView, and then calculate the PremiumPayable depending on ...
1answer
27 views

### Convert sigma formula to python dataset

I am trying to apply a formula I have found in a journal to my dataset. To give a quick background/context of the formula, it is applied to a time series of heart rate data. Each data point in the ...
1answer
14 views

### Python SymPy get equation from matrix element

How to get equation from element of matrix in sympy? I have a matrix called _RIGHT. I want to take equation from index 0,3 and copy to eq1. Expected eq1 will be same result in red box.
1answer
36 views

### Is there a way in Python 3.7 to turn a string equation into a formulated equation like Wolfram Alpha?

I'm trying to change an input of, say, "3^2+4^2=5^2" into an equation with the little 2's above the main numbers. What would be the way I'd convert that 1st string into the formula shown in the image? ...
0answers
50 views

### How to calculate vector U from this equation? [duplicate]

I have this equation: P = K*U P & U are vectors with 6 arrays & K is a 6*6 matrix. Arrays of U are unknown & I want to compute them but don't know how to write the code. K= [38.25 9....
1answer
44 views

### C# create an equation with Variables and If statement

I'm trying to have the user enter their information, and the program will take the info and find your BMI. I'm having trouble with my equation and if statement. I can't seem to find where my issue is. ...
1answer
29 views

### Solving an equation including a sum; How to find the right sum index in Matlab

I try to find the index of a sum that solves an equation. I have a vector holding different values and i want to find the element in that vector up to which all the elements equal a certain value. How ...
1answer
34 views

### Bash fails to perform a specific equation inside a script

I have a simple IRC bot written in Bash. It is using an external CLI IRC client (ii) and just reads the new messages that are sent to the channel from a file, does a little formatting on them, ...
1answer
50 views

### Equation return different values for the same variable

I'm trying to create a chart but it looks incorrect. For the range(0, 1000000) the chart should be starts at 0 and ends at 1 at x-axis, but it has negative values. In the begging it's OK, but after ...
1answer
77 views

### Explaining calc()'s approach to solving equations

I'm using calc() to set the top: attribute in a class. I need some help understanding how calc() gets used - two equations I believe should have the same result don't. (The top equation isn't ...
2answers
57 views

### Is there a general function or way in Java to calculate an equation of the form (a+b+…+n)^2 with a,b,n >= 0? [closed]

I need to find a way to implement an algorithm in Java that can calculate (a+b+...+n)^2 with a,b,n >= 0. The purpose is to use it afterwards in order to calculate Jain's Fairness index for my ...
1answer
82 views

### Pandoc, markdown, powerpoint: support for equations?

Pandoc can now generate powerpoint presentations from markdown. This seems to work quite well. However, when I try to include an equation – even something as simple as \$a=2\$ – the whole contents of ...
0answers
21 views

### Is there any method to solve log functions in sympy and get answer without ConditionSet

I have one variable equation and want to get the values for 'y'. But only return ConditionaSet. So is there any way to get the answer or are there any errors in my code? import sympy as sp y = sp....
3answers
36 views

### R- Get a list of output value from a formula

I have a formula looks something like this: y=2+3x+x^2 and I have a list of inputs values that I would like to plug in x then graph it later. So what I do is x<-seq(-2,2, length.out=20) formula &...
0answers
18 views

### What is the formal regression equation used by lm.cluster in R?

When using lm.cluster, I have three fixed effects variables (which have different levels), and 1-3 'explanatory' variables (in one case I have 1, and in another case I have 3). What is the formal ...
3answers
56 views

### Display the item nearest to current time

I have a list of dates/times items in PHP array that are formatted like this: 2019-03-19 00:00:00 2019-03-19 02:30:00 2019-03-19 05:00:00 2019-03-19 14:30:00 2019-03-19 23:59:59 etc. I'm sure this ...
2answers
50 views

### Finding the odd point in a dataset without using loops

I am given a set of points (p1,q1) (p2,q2) ... (p20,q20) which satisfy the function q = 1/(ap + b)^2 except that one of these does not satisfy the given relation. The values of a and b are not given ...
1answer
56 views

### Calculate variables from 6 non-linear equations with 6 unknowns in R

Looking to calculate a,b,c,d,e,f (6 variables) from 6 non-linear equations: The following is my code library('BB') library('nleqslv') y <- rep(NA,6) params <- function (x) { a <- x b &...
0answers
71 views

### More advanced mathematic typesetting using groff and eqn?

I've been learning Groff and eqn for document typesetting - I'm a physics and mathematics student, so a lot of my documents require semi-complex mathematical formatting. Generally, I'm using eqn for ...
0answers
25 views

### How to solve overdetermined quadratic system in Circle Packing

I'm working on a program where I have to satisfy an overdetermined system of non-linear equations. Basically, the program will add points dinamically, and every new point must be added where it ...
2answers
105 views

### How to solve a linear system of a square matrix in C++ when the matrix has no LU-Decomposition?

I have been trying to develop a program to solve a system Ax=b for a square matrix A using LU-Decomposition. However, I realized that this decomposition does not always exist (one way to tell is if a ...
0answers
15 views

### Equation to calculate position in grid

I have this pattern and am not sure exactly how to turn it into an optimized equation for mapping to a block (0000, 1111, or 2222). 1111 0000 1111 0000 2222 2222 2222 2222 0000 1111 0000 1111 2222 ...
0answers
9 views

### asciimath: Equation numbers

How can I get equation numbers added to asciimath:[] expression? That is, how can I get the '(5)' in the formula such as E = m c^2 (5) Is there a method to refer to equation ...
0answers
38 views

### NameError: name 'x' is not defined for an equation program

I am trying to program an iterative equation that will iterate the equation based on the number of times a user specifies. I have the following code: import matplotlib.pyplot as plt import numpy as ...
4answers
40 views

### Python3 - solve math equations that are in string format [duplicate]

Is there a way to solve math equations that are in string format? For example, I have x = 2 y = 3 equations_str = ('x+y', 'x-y') and I want a function that will give results = (5, -1) I want to ...
0answers
24 views

### Equation of line bending into a 3D knot

I want to animate a line bending into a knot for a presentation. I cannot figure out what equations I need to model. I know the equation of knot, but is it possible to know what equation the particles ...
2answers
43 views

### Python: read a variable from list of a file in order to calculate equation

I have to calculate different equation (we assume 3 reactions). Each one uses a different variable and I have to read this variable from a file list.txt. So my idea is: f = open('list.txt') lines = f....
0answers
13 views

### an error while multiplying two symbolic functions in system differential equation

Iam running this code in matlab to solve a system of two diff equations. Every thing works until I add in "eq2" a multiplication by t, and then I got an error Warning: Explicit solution could not be ...
3answers
55 views

### Iteration for x value in equation

I've been set a task to iteratively calculate the value of x of the given formula : x3 - 3x + 4 = 0** using trial and error. The code will first plug in -1.5 as its first guess and then work up or ...
0answers
13 views

### Describing long numbers in a short way

Imagine we have a number with N digits. N can be 100, 200, 1000,000, etc. Let's suppose we have a 100,000-digit number. Such a number can start with 0000000..................00001 (with 100,000 ...
0answers
31 views

### Solve constrained equation with 12 variables

I am struggling with something that should be a simple task. I want to solve this equation to find all the possible solutions (for Xi, i=1...12). Y = a*X1 + b*X2 + .... + z*X12 (I have 98 fixed ...
0answers
28 views

### How to use the Levenberg-Marquardt algorithm to fitting data and get the first derivative in Matlab?

I'm implementing the Levenberg-Marquardt algorithm in matlab to minimize a set of data resulting from a black-box equation. My question is how to calculate the jacobian matrix?
2answers
85 views

### Parse equation to list of tuples in Python

I want to parse equations and get a list of tuples. For example, when I enter 2x = 4+3y, I want to get [('', '2', 'x', '='), ('','4','',''), ('+','3','y','')] This is my regex so far: ([+-]*)(...

http://mssss.yulina-kosm.ru