Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Solving simultaneous equations

Subject: Solving simultaneous equations

From: kumar vishwajeet

Date: 22 Jan, 2014 19:51:08

Message: 1 of 2

Hi,
I have n equations of the following form:
for i = 1:n
sum_{j=1}^n a_{ij}x_j = b_i
end
I need to solve for x_j. Can I solve it using "solve"? If yes, how should I write it? Assume that n >10.

Thanks,
Kumar

Subject: Solving simultaneous equations

From: Alan_Weiss

Date: 22 Jan, 2014 20:30:52

Message: 2 of 2

On 1/22/2014 2:51 PM, kumar vishwajeet wrote:
> Hi,
> I have n equations of the following form:
> for i = 1:n
> sum_{j=1}^n a_{ij}x_j = b_i
> end
> I need to solve for x_j. Can I solve it using "solve"? If yes, how
> should I write it? Assume that n >10.
>
> Thanks,
> Kumar

Do you have numeric values for a_{ij} and b_i, or are they symbolic
expressions?

For numeric, see the documentation on solving systems of linear equations:
http://www.mathworks.com/help/matlab/math/systems-of-linear-equations.html

For symbolic, see linsolve:
http://www.mathworks.com/help/symbolic/linsolve.html

Alan Weiss
MATLAB mathematical toolbox documentation

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us