Questions tagged [equation-solving]
763 questions
0
votes
1 answer
Equation solving containing besselj
In Matlab how we find a in J0(ax)=0 where J0 is bessel function of first kind and zero order, and x is a known vector?
How we can find a as a vector?
0
votes
0 answers
GMRES with preconditioner takes more time
I have implemented GMRES with preconditioning and as per literature it gives fast convergence but to construct preconditioner requires more time(increases with matrix size) so the effective time required to find the solution is more. I have used SOR…

user2790773
- 31
- 2
0
votes
1 answer
Quadric equation parser using QRegExp
I want to implement a parser for a quadric equation using regular expressions. I want to keep it as a console app. I done the regex and tested it in Debuggex. Currently I have 2 problems - I can't get the a,b,c from (ax^2+bx+c) and i want to add…

Nazar554
- 4,105
- 3
- 27
- 38
0
votes
0 answers
Test succeeds in Python interpreter, but unit test in command prompt fails
I have the following things defined:
def test_groupEs(self):
for in_list, out_list in self.groupEs_tests:
self.assertEqual(linSol2.groupEs(in_list), out_list)
groupEs_tests = [
(['4.0x', '-', '2.0e', '-', '4'], ['4.0x', '-'…

Martin Thetford
- 133
- 1
- 1
- 6
0
votes
1 answer
Slatec + CUDA Fortran
I have code written in old-style Fortran 95 for combustion modelling. One of the features of this problem is that one have to solve stiff ODE system for taking into account chemical reactions influence. For this purpouse I use Fortran SLATEC…

Yakovenko Ivan
- 29
- 9
0
votes
3 answers
Setting up a system of linear equations in matlab
I have the following equation that I want to solve:
H*b0 = M(Q+1)b(Q+1)+l+M'B
The unknowns are b0, b(q+1) and B. The sizes of the known matrices are:
H=(42 x 42)
M(Q+1) = (42 x 21-P)
l = (42 x 1)
M' = (42 x 4)
So I want to figure out how to…

yankeefan11
- 485
- 1
- 6
- 18
0
votes
1 answer
Best way solving optimization with multiple variables in Matlab?
I am trying to compute numerically the solutions for a system of many equations and variables (100+). I tried so far three things:
I now that the vector of p(i) (which contains most of the endogenous variables) is decreasing. Thus I gave simply…

Josef Strauss
- 9
- 1
- 1
- 2
0
votes
1 answer
Matlab . Attempted to access y(4); index out of bounds because numel(y)=3
I have a problem with matlab ode45. When I write the system y(1) and y(2) only it works but when I use more it sayes
Attempted to access y(4); index out of bounds because numel(y)=3
Here is the code of my program, plz check it
`
function…

user2362291
- 17
- 2
- 3
- 7
0
votes
5 answers
Solving Quadratic Formula
I'm writing a program to solve quadratic equations using the quadratic formula but it only works when a = 1 but i want it to work when a is more than 1
Here is my code:
import math
def solve(a, b, c):
x = ((-1)* b +…

Serial
- 7,925
- 13
- 52
- 71
0
votes
2 answers
How to express and solve this differential equation system in Matlab?
The equations looks like this:
dxi(t)/dt = -c * xi(t) * yi(t)
dyi(t)/dt = a * Σ{i=1 to n}(xi(t) * yi(t)) + xi(t) * yi(t - 1) + b
where a, b and c are whatever constant values you want, for example a=1, b=2, c=3.
Σ{i=1 to n}(xi(t) * yi(t)) means…

JZ555
- 617
- 2
- 7
- 16
0
votes
1 answer
How can I use assumptions with FindRoot[] in Mathematica?
In Mathematica I have something like
FindRoot[f[x], {x, a}]
Now I want FindRoot to constrain the solutions to 0 < x < 1.
How can I obtain this?
Thanks

psmith
- 167
- 1
- 12
0
votes
1 answer
Solve a system of equations depending on a set of parameters with Mathematica
Using Mathematica, I want to solve a system of nonlinear equations like
f(x,y;m)=0
g(x,y;m)=0
where m is an external parameter on which the equations depends on.
As the equations are very hard, what I do is to explicitly fix m, above all, and then…

psmith
- 167
- 1
- 12
0
votes
3 answers
Matlab: poor accuracy of optimizers/solvers
I am having difficulty achieving sufficient accuracy in a root-finding problem on Matlab. I have a function, Lik(k), and want to find the value of k where Lik(k)=L0. Basically, the problem is that various built-in Matlab solvers (fzero, fminbnd,…

HelenAlex
- 1
- 1
0
votes
2 answers
How can I solve 2 complex equations with 2 variables in MATLAB?
I have these two equations:
y1=a*(10/11- (3*i)/4) + b*(5/6+ (7*i)/5)
y2= -1+(j*2)
where: y1=y2 , And I want to find the exact value of "a" and "b" using only MATLAB.
Is there any MATLAB command I should use to solve these two equations??
p.s.: I…

James Mitch
- 519
- 2
- 11
- 26
0
votes
1 answer
Is there a way to get a parametric solution to matrix using matrix solver from some lin. algebra java library?
All the matrix solvers I've come across require the matrices to be square and invertible, but what about matrices that are not square and have multiple solutions...how would I go about finding a parametric form of this using java?

Skorpius
- 2,135
- 2
- 26
- 31