Questions tagged [equation-solving]

763 questions
1
vote
0 answers

Solving symbolic linear equations in Python gives unexpected answer

First of all please excuse the long wall of test coming up. I need to solve the following set of equations which arise from a coordinate transformation: Given v_n, v_m, x_p, z_p, y_p, s, d, solve the system below for v_yp, v_zp: I: v_n = v_yp *…
bproxauf
  • 1,076
  • 12
  • 23
1
vote
1 answer

solve linear equation system based on matrix ("Matrix dimension must agree")

I have a given matrix of size NxN (called M),a vector of Nx1 (called V), and two scalars (called a and b). I want to solve the linear system of equations for alpha. The dimensions are given as MATLAB reports them using the function size(-). (M + a…
Sim
  • 4,199
  • 4
  • 39
  • 77
1
vote
1 answer

Improve performance of code to solve equation

I am quite novice to MATLAB and I am struggling to find a solution to this equation. Where the matrices' dimensions are {λ} = N×K, {Y} = N×D, {π} = 1×K, and {μ} = D×K. What I have created looks more like a monstrosity than an efficient MATLAB…
Jespar
  • 1,017
  • 5
  • 16
  • 29
1
vote
3 answers

How can I get all solutions to this equation in MATLAB?

I would like to solve the following equation: tan(x) = 1/x What I did: syms x eq = tan(x) == 1/x; sol = solve(eq,x) But this gives me only one numerical approximation of the solution. After that I read about the following: [sol, params, conds] =…
1
vote
1 answer

Is the first step of this Gauss-elimination pseudocode correct?

Does first step in algorithm should look like following? // find the element with largest absolute value in col p and below row p-1 So instead of all col p just part of it. Algorithm: for p = 1 to n do // find the element with largest…
ldurniat
  • 1,687
  • 2
  • 9
  • 16
1
vote
2 answers

How can I find an explicit solution to this equation?

In the field in which I work there's a kind of score called a SEDI: I've been asked to solve this equation for F. I've been informed by a generally reliable source that there should be an analytic solution. Generally I use MATLAB for such problems,…
1
vote
0 answers

How to solve extremely large systems of equations

I need to solve a large system of equations. The system that I need to solve now has 30 equations and 30 unknowns, but I need to be able to use this same system to solve 1,000 equations and 1,000 unknowns. I do not need to know the answers for all…
Paul Terwilliger
  • 1,596
  • 1
  • 20
  • 45
1
vote
1 answer

System of equations with unknowns in R

I have a 3x3 matrix Omega whose elements are unknown, and a defined 3x1 parameter vector alpha. I want to define a 3x1 vector delta whose elements are still unknown but depend on alpha and Omega as shown in this image: The term in the brackets to…
Kondo
  • 125
  • 6
1
vote
1 answer

Different results, using same data and method(?), when using WordMat and R

I am interested to reproduce results calculated by the GNU plugin to MS Word WordMat in R, but I can't get them to arrive at similar results (I am not looking for identical, but simply similar). I have some y and x values and a power function, y =…
Eric Fail
  • 8,191
  • 8
  • 72
  • 128
1
vote
1 answer

Using fzero in Matlab or Octave, avoiding for loop and complex solutions

I'm using fzero function to solve a non-linear equation depending on one parameter and I'm not satisfied with my method. I have these issues: 1) Can for loop for the parameter be avoided ? 2) In order to avoid complex solutions I first have to…
miquo
  • 75
  • 1
  • 6
1
vote
6 answers

Simpler way to find solution of equation

I have following equation: f(N): N = ((1+lam)^3 )/ ((1-lam)*(1+lam^2)); I need to create a function that finds lam for specified N. Right now I'm doing it using simple loop: lam = 0.9999; n = f(lam); pow = 0; delta = 0.1; while(abs(N - n)) > 0.1 &…
Gacek
  • 10,184
  • 9
  • 54
  • 87
1
vote
2 answers

Solving a system with two equations and two variables in a for loop

I would like to solve a system with two equations and two variables. Tau(i)and Roh(i) are input arrays. Tau=[0.91411 0.91433 0.91389 0.91399 0.91511 0.915] Roh=[0.07941 0.07942 0.07952 0.07946 0.07951 0.07947] I would like to calculate R(i)and…
Hamed
  • 193
  • 2
  • 9
1
vote
1 answer

Gaussian Elimination not working

I tried to write a program that does LU split using Gaussian elimination. My program splits Matrix A into A=LR where L,R are triangular matrices. This works perfectly well. Let Ax=b be a system of equation. My input to the program is (A,b) and I…
XPenguen
  • 163
  • 1
  • 8
1
vote
0 answers

Set complex constrain - Choco

I have a constrain in this format: (1 + x*y/z*m)*(2/x*y) - 10 = 0 How can I add this constraint? IntConstraintFactory class provide a method called arithm to add simpler constraints like this one: //x + y > 10 IntVar x =…
dirac
  • 309
  • 1
  • 9
1
vote
1 answer

How can I numerically solve equations containing Bessel functions in MATLAB?

I have confronted an equation containing Bessel functions of the first type on one side and modified Bessel functions of the second type on the other. I want to know its exact solutions (values of u). The equation is as…
Aida
  • 11
  • 1
  • 2