PythonskripteMR_TZ24-1.ana1/EindeutigesGleichungssystem...

22 lines
397 B
Python
Raw Normal View History

2024-11-25 14:58:06 +01:00
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 5 16:58:41 2024
@author: Carla
Lineare Algebra
Übung 03 Gauss
"""
#Python initialisieren
import numpy as np;
#Parameter
A=np.array([...]);
b=np.array([...]);
pr_L=...; pr_C=...;
#Berechnungen:
L=np.linalg.solve(A,b);
C=np.linalg.cond(A);
#Ausgabe
print(f"L= {np.array2string(L,precision=pr_L)}");
print(f"C= {C:#.{pr_C}g}");