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
0 answers

Java Draw Linear Equation Graph Inside JFrame

I have a school assignment for CompSci where we need to create a graph for linear equations. This graph should have the axes drawn, and it should have two lines that are drawn from two equations. I have the graph itself working correctly, but I…
user10515958
0
votes
1 answer

Why is an empty list returned when solving for this linear system in Maxima?

I'm trying to solve a simple linear system in Maxima using solve like so: /*Standard form*/ eq1 : x1 + 3*x2 + s1 = 6; eq2 : 3*x1 + 2*x2 + s2 = 6; base1 : solve([eq1,eq2],[s1,s2]); This however returns an empty list and I don't know why. Any…
sesodesa
  • 1,473
  • 2
  • 15
  • 24
0
votes
2 answers

How can I fix Y at 2 if my X is more than 2000?

I have this line of equation in my JavaScript code. Y= M*X + C Y= -0.001*(X) + 4.1 My value for Y should be 2 at maximum, meaning my X input should be 2000 at max. However, I could not set the limit of X to 2000 as I would need the actual value of…
NoobProgrammer
  • 474
  • 4
  • 21
0
votes
0 answers

**All possible** non-negative integer solutions to system of linear equations and inequalities in MATLAB

I am repeating a question (non-negative integer solutions to system of linear equations in mathematica) here for MATLAB. Say I have a system of linear equations and inequalities (or boundary). I want ALL possible non-negative integer solutions of…
0
votes
1 answer

Matrix dimensions error when using norm()

I'm trying to use MATLAB to run Richardson's iteration for computing the solution of a linear system, Ax=b. I wrote a function to do this, but got an error when I tried to run it. The following is my function where x0 is the initial iterate, L is…
0
votes
1 answer

Where to get free data set for sparse system of linear equations?

I am trying to parallelize gaussian elimination on sparse linear equations. I could not find data to test any where on the internet. If you could provide links to such data set that will be great. Also could someone please explain how are sparse…
0
votes
1 answer

Solve One Equation Multiple times

I have 50 observations as rows and columns with variable values. For each observation, I use fsolve to solve for the unknown variable q_iz. I'm trying to use LOOP. I have solved it for 1st row but MATLAB throws an error when it is going to 2nd row.…
sayan de sarkar
  • 185
  • 1
  • 10
0
votes
1 answer

How to take Linear Model results with interactive variables & transformations and create an algebraic equation

I have a project to estimate commercial real estate properties given categorical and continuous variables. I have ran a step-wise linear regression model to pick out a good formula in RStudio. (Adj. Rsq = .90 also, I know I need to do PCA and some…
0
votes
1 answer

Solving Linear equation in R

Is there a way to compute correlation of U = 2X1 − X2 and V = X1 + 2X2 using R (not manually) given the variance of X1, variance of X2 and Covariance between X1 and X2?
AKSHAYAA VAIDYANATHAN
  • 2,715
  • 7
  • 30
  • 51
0
votes
1 answer

Very long numbers after adding symbolic variables?

So I want to determine the alpha, beta and gamma values of my SVM classifier, I trained my SVM classifier and determined the alpha and support vectors. My support vectors have 3 variables per row, below are just ten rows from my support vector:…
StuckInPhDNoMore
  • 2,507
  • 4
  • 41
  • 73
0
votes
1 answer

matrix extension in netlogo for system of equations

I have two agents, distributers and suppliers. Each of these turtles have a number of variables which some of them are defined global to be able to be assigned to agents of another type. The question is that I am trying to solve a system of…
Naha
  • 15
  • 4
0
votes
1 answer

R Optimize linear equations coefficients with constraints

Say I have n linear equations of the form: ax1 + bx2 + cx3 = y1 -ax1 + bx2 + cx3 = y2 -ax1 -bx2 + cx3 = y3 Here is n=3 and a,b,c are known and fixed. I'm looking for the optimal values for x1,x2,x3 such that their ranges are within [-r,r] for some…
Juergen
  • 3,489
  • 6
  • 35
  • 59
0
votes
1 answer

How to extend the line of 2 PolyFit from either side to intersect and get a combined fit line

I am trying to get combined fit line made from two linear polyfit from either side (should intersect), here is the picture of fit lines: I am trying to make the two fit (blue) lines intersect and produce a combined fit line as shown in the picture…
0
votes
1 answer

Linear programming maximization code in MATLAB

How to solve the linear programming maximization problem that contains both <= and >= equations? For example here's a case: Maximize: z = c1x1 + c2x2 + c3x3 Subject to: a1x1 + a2x2 + a3x3 <= b1 a4x1 + a5x2 + a6x3 <= b2 x1 >= d1 x2 >= d2 x3 >=…
0
votes
2 answers

Solving and producing and equation with variables indexed by a given set (Haskell)

I want to solve the following problem in Haskell: Let n be a natural number and let A = [d_1 , ..., d_r] be a set of positive numbers. I want to find all the positive solutions of the following equation: n = Sum d_i^2 x_i. For example if n= 12 and…
Miguel
  • 103
  • 3