Solves a linear system of simultaneous equations

버전 1.0.0.0 (1.39 KB) 작성자: Bruce Raine
Solves a linear system of simultaneous equations of n unknowns in n equations
다운로드 수: 429
업데이트 날짜: 2010/4/8

라이선스 보기

simequation(a,b)
a must be a n x n matrix of coefficients and
b must be a n x 1 matrix of constants

Example usage to solve this system of 2 simultaneous linear equations in 2 unknowns:

2x + 4x = 3 and
3x + 5x = 6

%coefficient matrix..
>> cm = [ 2 , 4; 3, 5]
cm =
2 4
3 5
>>

%..calling the function to solve the simultaneous linear equations...pass the constants as a column vector.
>> simequation(cm,[3;6])

ans =

4.5000
-1.5000

% check answer
>> cm * ans

ans =

3.0000
6.0000

>>

인용 양식

Bruce Raine (2024). Solves a linear system of simultaneous equations (https://www.mathworks.com/matlabcentral/fileexchange/27207-solves-a-linear-system-of-simultaneous-equations), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0