text
stringlengths 0
211k
|
---|
p_mZ(X, S10,P4, S8,P4, C4); |
getchar(); |
clrscrn(); |
printf(" b1 b2 ... bn"); |
p_mZ(B, S6,P0, S3,P0, C6); |
printf(" Ax1 Ax2 ... Axn"); |
mul_mZ(A,X,T); |
p_mZ(T, S6,P0, S3,P0, C6); |
f_mZ(T); |
f_mZ(X); |
f_mZ(B); |
f_mZ(Inv); |
f_mZ(A); |
stop(); |
return 0; |
/* ------------------------------------ */ |
Exemple de sortie écran : |
We want to find X such as, |
AX = B |
If A is a square matrix and, |
If A has an inverse matrix, |
you can find X by this method |
X = inv(A) B |
To verify the result you can |
multiply the matrix A by X. |
You must refind B. |
---------------------------------- |
A : |
+1 +2i +3 +4i +5 +6i |
+5 +4i +1 +3i +6 +8i |
+7 +2i +5 +1i +1 +1i |
b1 b2 ... bn |
+1 +2i +2 +3i +3 +5i |
+3 +4i +2 +4i +3 +4i |
+5 +6i +2 +5i +3 +3i |
---------------------------------- |
inv(A) : |
-1.2917e-01 +8.1007e-02i +8.5597e-02 -6.6602e-02i +8.5160e-02 -3.3778e-04i |
+1.8258e-01 -8.6352e-02i -1.5122e-01 +8.1911e-02i +9.3058e-02 -3.8517e-02i |
+3.7156e-03 -6.3244e-02i +7.1142e-02 -3.4463e-02i -8.4514e-02 +1.6084e-02i |
X = inv(A) * B : |
x1 x2 ... xn |
+0.6598 +0.4745i +0.1082 +0.4088i -0.0129 -0.0058i |
+0.2704 +0.2854i +0.3728 +0.3222i +0.5929 +0.4583i |
-0.0376 -0.3013i +0.2279 -0.2901i +0.3769 -0.1953i |
b1 b2 ... bn |
+1 +2i +2 +3i +3 +5i |
+3 +4i +2 +4i +3 +4i |
+5 +6i +2 +5i +3 +3i |
Ax1 Ax2 ... Axn |
+1 +2i +2 +3i +3 +5i |
+3 +4i +2 +4i +3 +4i |
+5 +6i +2 +5i +3 +3i |
Press return to continue. |
Mathc matrices/a187 |
Application |
Installer et compiler ces fichiers dans votre répertoire de travail. |
/* Save as : c00a.c */ |
int main(void) |
double a[RA*CA] ={ 4,2,3, |
5,3,1, |
8,2,2}; |
double **A = ca_A_mR(a,i_mR(RA,CA)); |
double **Minor = i_mR(RA-C1,CA-C1); |
int minor_r = R1; |
int minor_c = C1; |
clrscrn(); |
printf(" A :"); |
p_mR(A,S5,P0,C6); |
printf(" Minor(R%d,C%d) %.4e \n\n\n", |
minor_r, |
minor_c, |
minor_R(A,minor_r, minor_c)); |
printf(" Copy/Past into the octave window.\n\n"); |
p_Octave_mR(minor_mR(A, Minor, minor_r, minor_c),"Minor",P0); |
printf(" det(Minor)\n\n\n"); |
stop(); |
f_mR(A); |
f_mR(Minor); |
return 0; |
/* ------------------------------------ */ |
Exemple de sortie écran : |
A : |
+4 +2 +3 |
+5 +3 +1 |
+8 +2 +2 |
Minor(R1,C1) 4.0000e+00 |
Copy/Past into the octave window. |
Minor=[ |
+3,+1; |
+2,+2] |
det(Minor) |
Press return to continue. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.