Questions tagged [linear-equation]

An algebraic equation of the form y = mx+b

A linear equation is an algebraic equation in which each term is either a constant or the product of a constant and (the first power of) a single variable. More on Wolfram and Wikipedia.

203 questions
0
votes
1 answer

How do I convert if statement to linear equation?

I wanna convert this if statement to linear equation. for i,j -> 1 to n if D[i]>D[j] and f[i] > s[j] then w[i]+=c[j] The line below is what has come to my mind so far, but I do not know how to write the rest. C(j) has to be multiplied by a phrase…
parham
  • 1
  • 1
0
votes
1 answer

Is there an algorithm to average using different constraints on data?

Month Product Product Product Current 1 Y A 17 2 Y A 22 3 Y A 21 4 Y S Q 44 5 Y S Q 32 6 Y S Q 23 7 Y S B 56 8 Y S B 73 9 Y S B 12 10 Y C 26 11 Y C 45 12 Y C 37 As seen in table above I have some data,…
0
votes
1 answer

Minimizing a system of linear equations with limited variables in Octave

I have scoured Octave resources, pdfs on optimization, and many of the questions here, but I can't seem to find or understand the right solution. I'm trying to find a corrective solution to move a group of data points to match closely another set.…
0
votes
1 answer

Matrix rank and determinant vs. linear combinations of column vectors using sympy

If a square matrix is not full rank, its determinant is zero, its column vectors are linearly dependent and we can obtain one of the column vectors as a linear combination of the others. Below is a matrix which, according to sympy, has not full…
Alice Schwarze
  • 559
  • 7
  • 21
0
votes
1 answer

Uniqueness of the Solution of a Linear Equation System

I solved a linear equation system with np.linalg.lstsq() but I could not define a boolean which returns TRUE if the solution of the system is unique. Thank you in advance!
0
votes
1 answer

Can I find coordinates that meet with linear equation?

I have linear equation and list of coordinates. Can I find coordinates that meet with linear equation?
ZOOOO
  • 1
  • 1
0
votes
0 answers

Fortran warning for data type

I wrote the main program for a subroutine that solves a set of equations (Thomas algorithm) in Fortran. This is the code for a simple set of equations: Program Thomas implicit none integer i integer,parameter :: n=2 real,dimension(n) ::…
0
votes
1 answer

Using Matlab's backslash operator to invert sparse matrices is leading to some entries being rounded down to zero

I am using Matlab's backslash operator to solve a system of equations written as two matrices M1 and M2. These two matrices are square and tridiagonal, and so I have defined them as sparse. For example, with the dimensions of each being 5x5, they…
teeeeee
  • 641
  • 5
  • 15
0
votes
0 answers

Solve system of linear equations for integer solutions

I would like to solve a system of linear equations with the added constraint that the solution vector must only contain integers. I assume this can be accomplished by something like intlinprog, but it is not clear to me how a regular linear equation…
0
votes
0 answers

Any available methods to speedup cvxpy scs solver?

I meet a problem with the speedup cvxpy solve method(basically use SCS solver),the task contains lots of constraints and a big matrix. I have tried the following methods: use mkl blas & lapack library to replace the original library. (got a little…
colin-zhou
  • 185
  • 1
  • 15
0
votes
1 answer

solving linear equationsystem in cpp using lapacke_dgesv

I am trying to solve a very simple equationsystem of the form M*Z=V, where M is a 2x2 Matrix, V and Z are Vectors with 2 entries. If i use Z = linsolve( M, V ); in Matlab the result is correct. I need to implement this in C++ somehow so I am trying…
Bulbasaur
  • 135
  • 5
0
votes
1 answer

How to solve linear symbolic equations in matlab

I'm trying to solve the following linear symbolic system (20 equations) in Matlab, I get all the values in the solution as zeros, is there any mistake in my implementation? the data used in the code is here data %--------------------- % clear and…
Bilal
  • 3,191
  • 4
  • 21
  • 49
0
votes
0 answers

python code for solving linear system by LDL^t factorization

I try to solve linear system that is ax=b by LDU decomposition where L is lower triangular , D is diagonal matrix and U is transpose of L which diagonal entries are 1 but there was error that "TypeError: 'int' object is not subscriptable" here is…
김세윤
  • 19
  • 2
0
votes
1 answer

Why does row echelon form work for finding the Rank of a matrix?

I have been studying Linear Algebra and came across gauss-elimination method. While it does give the correct answers , I am not able to understand how it works. So, we compare each row with rest of the rows to see if any is dependent on the current…
Narender
  • 21
  • 5
0
votes
0 answers

Eigen, parallel ConjugateGradient failed: More threads, more costs

I want to use a parallel ConjugateGradient in Eigen 3.3.7 (gitlab) to solve Ax=b, but it showed that more threads, more computational costs. I test the code in this question and change the matrix dimension from 90000 to 9000000. Here is the code (I…