|
Equations
Normel |
|
|
|
|
|
|
|
|
|
|
Prohram |
Matrics |
Answer |
|
|
|
2x + 3y - 5z1 = -7 |
|
clc |
|
|
X = |
|
|
3x + 2y - 2z2 = 1 |
|
clear |
|
1 |
|
|
5x + 2y - 3z3 = 0 |
|
close all |
|
|
|
|
كسور عشرية |
format shortG |
|
|
|
|
MthLab |
|
¬ Z3 |
معاملات |
A=[2 3 -5; 3
2 -2;5 2 -3]; |
Y = |
|
|
z1=(2*x+3*y+7)/5; |
|
¬ Z2 |
ثوابت |
B=[-7;1;0]; |
|
2 |
|
|
z2=(3*x+2*y-1)/2; |
|
K=inv(A)*B; |
|
|
|
|
z3=(5*x+2*y)/3; |
|
¬ Z1 |
|
X=K(1); |
|
|
|
|
Y=K(2); |
|
Z = |
|
|
Back |
Example5 |
|
|
|
Z=K(3); |
|
3 |
|
|
Back |
Example6 |
|
X',Y',Z' |
|
|
|
|
Prohram |
|
|
|
OR:¯ |
|
Basic |
|
|
|
clc |
|
|
|
|
|
|
|
|
|
clc |
|
|
|
|
|
|
|
[x,y]=meshgrid(1:0.1:3,1:0.1:3); |
|
|
|
syms x y z |
|
|
|
z1=(2*x+3*y+7)/5; |
|
®®® |
|
|
|
|
[x y z]=solve(2*x+3*y-5*z+7,3*x+2*y-2*z-1,5*x+2*y-3*z) |
|
z2=(3*x+2*y-1)/2; |
|
|
|
|
|
|
z3=(5*x+2*y)/3; |
|
|
|
|
Prohram for soluation
liner equations |
|
|
surf(x,y,z1); |
|
|
|
|
|
clc |
|
|
|
|
|
|
hold on |
|
|
|
|
|
syms x y z |
|
|
|
|
surf(x,y,z2); |
|
|
|
|
|
f1=input('pls type the first equation ','S'); |
|
|
hold on |
|
|
|
|
|
f2=input('pls type the secod equation','S'); |
|
|
surf(x,y,z3); |
|
|
|
|
|
f3=input('pls type the third equation ','S'); |
|
|
datacursormode
on |
|
|
|
|
[x y
z]=solve(f1,f2,f3) |
|
|
|
|
%press on intersecation point to value |
|
|
x = |
[1] |
|
|
|
|
xlabel('Axsis
- x') |
|
|
|
|
y = |
[2] |
After Run |
|
|
ylabel('Axsis
- y') |
|
|
|
|
z = |
[3] |
|
|
|
|
zlabel('Axsis
- z') |
|
|
|
|
|
|
|
|
|
MatLab2015a |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
لمعرفة قيم المجاهيل x , y , z |
|
|
|
|
|
clc |
|
|
|
|
syms x y z |
|
|
|
|
|
f1=2*x+3*y-5*z==-7; |
|
|
|
|
f2=3*x+2*y-2*z==1; |
|
|
f3=5*x+2*y-3*z==0; |
|
|
[x y
z]=solve(f1,f2,f3) |
|
|
|
|
x = |
|
|
|
|
|
|
1 |
|
|
y = |
|
|
2 |
|
By: |
Graph ® |
|
|
z = |
|
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|