Questions tagged [equation-solving]

763 questions
0
votes
1 answer

Operations with function handle in matlab

Could you please help me with the following issue: I have the following function handle: r1 = @(lambda) b + lambda*(r - b); % r and b are vectors of return data I want to find the optimal lambdas that set me a mean function to zero, for a given set…
Astrid
  • 43
  • 1
  • 2
  • 7
0
votes
1 answer

Solving an inequality with Matlab

I have to solve an inequality but it is too hard to do it by hand. Therefore, I would like to use Matlab. Let a = [(k-3)*sqrt(v)]/s and b = 1.08148*a^2-epsilon, where epsilon = 10^(-6). The inequality that needs to be solved is: q(a,b) <…
Cavents
  • 135
  • 6
0
votes
2 answers

compound maths in php wrong, losing 3.00

I have got a calculation written in php, its meant to calculate the total balance (echo $vf;) after 3 months. The answer I get is 603.00 The answer I should get is 606.02 Somewhere I have gone wrong that it is losing 3 the math, any idea ? I have…
Beep
  • 2,737
  • 7
  • 36
  • 85
0
votes
1 answer

Solve a numeric equation

I would like to solve the following equation in MATLAB: L=(9.81.*P.^2)./(2.*pi).*tanh(2.pi.(d./L)) The P and d are predefined vectors. L is the variable to be solved to. I try to solve this problem with: %First guess L0 = 1.56 * P; fsolve( @(L) …
Leonor
  • 29
  • 7
0
votes
1 answer

Matlab 1D Advection

I'm writting a code to solve the "equation of advection", which express how a given property or physical quantity varies with time. For that I've this expression: https://gyazo.com/f531cb756ffbd3ec28ab85ea1f09b18d This is one of my issues, I dont…
0
votes
1 answer

"uniroot" doesn't work

Here is the equation to be solved: sum( (x-miu)/(1+l*(x-miu)) ) == 0 x is a vector x<- c(0.490239414, -0.041047069, -0.062440582, -0.020759616, -0.084667527, 0.006101447, 0.985401602, -0.665158752, 0.153003354, 0.515112122) miu=0.1 I tried…
Charles Yan
  • 83
  • 1
  • 1
  • 9
0
votes
1 answer

Using python 2.7.10 fsolve to find the root of a single variable nonlinear equation given a constant

Sorry, I'm new I would like find the root of the equation f(x) = exp(x)*erfc(sqrt(x))- (1/(1+y)) where y is a constant passed to the equation. I have written the following in Python 2.7.10 1 from scipy.optimize import fsolve 2 import…
OldGuy
  • 53
  • 2
  • 5
0
votes
1 answer

solving set of linear equations using R for plane 3D equation

I have some trouble in order to solve my set of linear equations. I have three 3D points (A, B, C) in my example and I want to automate the solving of my system. I want to create a plane with these 3 points. It's very simple manually…
EaudeRoche
  • 207
  • 4
  • 19
0
votes
0 answers

Using Fsolve to solve N-1 equations in N-1 unknowns

I've been looking around but I can't seem to figure out how I should use fsolve to solve my system of nonlinear equations. so I have a function k, and I know that I want .01 as the starting value (required input for fsolve I believe). I also know…
majmun
  • 131
  • 9
0
votes
0 answers

Matlab solving geometric sum numerically

let's suppose I have geometric sum (a<1) of the form: x + a*x + a^2*x + ... a^T*x = Y where I know Y and a and I want to solve for an x on the LHS that matches the RHS Y. If my actual problem was that simple, I could calculate the LHS analytically…
marky2k
  • 97
  • 1
  • 5
0
votes
2 answers

Error while solving system of equations

I received a negative MATLAB response while inserting the following requests: syms x y z solve (x+y==z,x-2*y==z,[x,y],'ReturnConditions', false) I wanted to get x, and y in terms of z but, alas, I got the following error: ??? Error using ==> char …
Abr001am
  • 571
  • 6
  • 19
0
votes
1 answer

How to call numerical results to integrate a ODE using Runge-Kutta-4 in Python 3?

I'm trying to solve (for m_0) numerically the following ordinary differential equation: dm0/dx=(((1-x)*(x*(2-x))**(1.5))/(k+x)**2)*(((x*(2-x))/3.0)*(dw/dx)**2 + ((8*(k+1))/(3*(k+x)))*w**2) The values of w and dw/dx have been found already…
CamPos
  • 1
0
votes
1 answer

How to accurately calibrate a measurement using a higher order correlation?

I have about 1000 measurements using a device. Let's call these measurement y. For each of these measurements, I know what the actual measurement should be, let's call these z. How I can calibrate, adjust, or scale y for a better estimation? I was…
afp_2008
  • 1,940
  • 1
  • 19
  • 46
0
votes
1 answer

Solving for non-trivial solutions in homogeneous system of linear equation

How to solve for the non trivial solution to the homogeneous system of linear equation. I tried with solve command but it gives only trivial solutions. eigen(A)$vector[,x] gives answer only for the square matrix i.e for evendetermined system.
ddivya
  • 1
  • 2
0
votes
0 answers

Selecting correct variables' value from a solution

I am doing a cryptography program in Python. It consists in reading a random phrase, like HELLO. Then it assigns it's respective ASCII values like: H = 72, E = 79. Then, using Pythagoras' Theorem, it creates two numbers C1 and C2, like this: C1 =…