# Solving non-linear and linear simultaneous equations with fsolve (Scripts) 1.0

Average Rating
User Rating:
Visitors Rating:
My rating:

• Last update: 6 years ago
• Price: Free |
• Operating system: Linux, Mac OS X, Win All, BSD, Solaris
• Publisher: Bruce (14 other programs)
See full specifications

## Solving non-linear and linear simultaneous equations with fsolve (Scripts) Publisher's description

### solvesimul.m can be easily adapted to solve more equations but as it stands it will solve 2 unknowns in 2 equations (1 non-linear and one linear).

solvesimul.m can be easily adapted to solve more equations but as it stands it will solve 2 unknowns in 2 equations (1 non-linear and one linear).

To solve equations of this form...

a*x + b*y = A (1)
a1*x^2 + b1*y^2 = B (2)

...with fsolve (used by solvesimul.m) you need to rewrite them so that they equal zero.

so (1) and (2) become
a*x + b*y - A = 0 (1a)
a1*x^2 + b1*y^2 - B = 0 (2a)

then using a nested function approach (there are many other ways) you can solve some system of non-linear equations.
An example,

2*x + 3*y - 8 = 0
4*x^2 + 5*y^2 - 24 = 0

At the MATLAB command-line prompt you run the 'solvesimul' m-file function with the correct arguments
i.e. coefficients and constants in the equations in the appropriate order.
NB: please see final note below demo of the solvesimul command.

>> b=solvesimul(2,3,4,5,8,24);
1.0e-014 *

0
0.7105

>> b

b =

1.0000
2.0000

These are the solutions for the 2 equations i.e. x = 1, y=2.
----------------------------------------------------------------
The code I wrote for 'solvesimul' is attached. Save it to your working folder and run as above.
NB: you can use any one of the 3 fsolve formats by commenting out the other 2 you don't need in the attached m-file code.

Important:
You need to enter the args (i.e equation coefficients) to solvesimul.m in the order they appear in the equations with equation constants specified last in the correct order.

#### System Requirements:

MATLAB 7.9 (2009b)
Program Release Status: New Release
Program Install Support: Install and Uninstall

#### Solving non-linear and linear simultaneous equations with fsolve (Scripts) Tags:

Click on a tag to find related softwares

## Most Popular

ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.