Questions tagged [equation-solving]
763 questions
3
votes
1 answer
Matlab's solve: Solution not satisfying the equation
I am trying to solve equations with this code:
a = [-0.0008333 -0.025 -0.6667 -20];
length_OnePart = 7.3248;
xi = -6.4446;
yi = -16.5187;
syms x y
[sol_x,sol_y] = solve(y == poly2sym(a), ((x-xi)^2+(y-yi)^2) ==…

Ankush
- 235
- 3
- 14
3
votes
0 answers
Understanding one of the active contour algorithm equations
I'm working with a image segmentation using Active Contour Algorithm. I'm reading book 'Deformable Models: Biomedical and Clinical Applications'. There's is written how to apply this algorithm. I'm stuck because I don't undestant this highlighted…

Ugnius Malūkas
- 2,649
- 7
- 29
- 42
3
votes
3 answers
Matlab solution for two graphs
I have a function f(t) and want to get all the points where it intersects y=-1 and y=1 in the range 0 to 6*pi.
The only way I cold do it is ploting them and trying to locate the x-axis pt where f(t) meets the y=1 graph. But this doesn't give me the…

camelbrush
- 236
- 6
- 16
3
votes
2 answers
More efficient algorithm preforms worse in Haskell
A friend of mine showed me a home exercise in a C++ course which he attend. Since I already know C++, but just started learning Haskell I tried to solve the exercise in the "Haskell way".
These are the exercise instructions (I translated from our…

reish
- 831
- 7
- 18
3
votes
2 answers
Find positive solutions to underdetermined linear system of equations
Consider a problem of the following:
Find x_1, x_2, x_3 > 0 such that
67.5 = 60*x_1 + 90*x_2 + 120*x_3 and
60 = 30*x_1 + 120*x_2 + 90*x_3
In this case I want the solution
0 < x_3 < 3/7,
x_2 = 7/20 - 4/10*x_3, and
x_1 = 2/5 - 7/5*x_3
Is there…

htd
- 311
- 1
- 5
- 15
3
votes
3 answers
Finding more than one root with root finding algorithms
What is the best way to find the roots of an equation with more than one root. I understand that no one method which can solve every equation, and that you have to use more than one, but I can't find a root finding algorithm that can solve for more…

user2280687
- 203
- 3
- 9
3
votes
4 answers
How to solve n*log2(n)=A in matlab?
n*log2(n) = A, with A a known value. How do I solve for n in Matlab? Note that n isn't necessary an integer.

zoey
- 529
- 1
- 6
- 14
3
votes
4 answers
PHP algorithm to solve a system of linear equations of grade 1
I have a system of equations of grade 1 to resolve in PHP.
There are more equations than variables but there aren't less equations than variables.
The system would look like bellow. n equations, m variables, variables are x[i] where 'i' takes values…

Daniel Ifrim
- 277
- 3
- 12
3
votes
1 answer
Solving for unknown upper bound of the integral
I am trying to implement an algorithm in R that involves solving for the boundary limit of the integral. For example, I want to find a given the following integral:
integral_0^a exp(x) = 1/2
I have a rough idea how to do it in matlab. But how would…

notrockstar
- 833
- 3
- 15
- 28
2
votes
5 answers
I convert ASCII words into numbers but am stuck trying to decode them. How to convert 1=a, 2=b, 28=ab etc? (psudeocode okay)
So I thought I'd teach myself C++ but I appear to have no problems with the language but I am frankly stupid.
So my idea was this. If I say a=1, b=2, z=26, aa=27 etc, I can map words to numbers, use a boolean in a hash table (bit masked of course)…

Philluminati
- 2,649
- 2
- 25
- 32
2
votes
2 answers
Matlab Solve function solutions don't satisfy equation
I have an equation that theoretically has to only have one positive solution and the rest must be negative. So I used matlab solve function but two of the solutions are positive instead of one. Then as expected, by testing the solutions one of them…

Hafez Mousavi
- 59
- 6
2
votes
1 answer
Solving Systems of Equations Symbolically Using Matlab
I have an optimization problem where I want to optimize the thicknesses t1, t2, t3 by solving them symbolically. The solutions should be approximately:
t1 = 1.72053;
t2 = 1.91395;
t3 = 0.781725;
%Given
M_y = 2000000; %[Nmm]
b …

Malte Grube
- 23
- 2
2
votes
0 answers
Solving multiple solution equation in Python
I need to get the solutions of the following trigonometric equation:
I know there exists either M or M-1 solutions depending on the value of $\Delta$. Does anyone know of any module or algorithm that I can use in Python for this task?
I've tried…

amarouxo
- 21
- 1
2
votes
1 answer
Trying to solve a system of non-linear equations using GEKKO. The system has multiple solutions, however GEKKO gives the wrong one. How do I fix this?
I am trying to solve systems of multiple non-linear equations similar to this one:
As you can see by the graph, there are two solutions to the system. Through much trial-and-error and different methods (fsolve, etc.) to accomplish this, I stumbled…

sfarls
- 25
- 3
2
votes
3 answers
How to perform loan equations in Java?
I'm trying to make a program that will allow the user to determine different aspects when considering a loan. The first equation is supposed to determine what the monthly payment would be given the loan amount, interest rate, and number of months.…

Haley
- 41
- 4