๐Ÿ“
B.TECH โ€ข R25 โ€ข COMPUTATIONAL MATHEMATICS

Computational Mathematics - Lab Manual

Computational Mathematics Laboratory โ€ข Using Python / MATLAB Software

๐Ÿ“˜ R25 Regulation ๐Ÿ“ Computational Mathematics ๐Ÿ Python / MATLAB ๐Ÿงช Lab Experiment
โ† All Experiments

Aim:

☛  
UNIT - I: Eigen values and Eigenvectors:
Programs:
      โ€ข Finding real and complex Eigen values.
      โ€ข Finding Eigen vectors.

Solution :

PROGRAM: (Eigen_Values_Vectors.py)

 
import sympy as sp

# Define matrix (you can change values)
A = sp.Matrix([[1, 2],
               [5, 4]])

# Eigenvalues and eigenvectors
eigen_data = A.eigenvects()

print("Eigenvalues and Eigenvectors:\n")

for val, mult, vecs in eigen_data:
    print("Eigenvalue:", val)
    print("Eigenvector:", vecs[0])
    print()


OUTPUT:

 
Eigenvalues and Eigenvectors:

Eigenvalue: -1
Eigenvector: Matrix([[-1], [1]])

Eigenvalue: 6
Eigenvector: Matrix([[2/5], [1]])



๐Ÿ’ป Run This Python Program

triangle using for loop
The selected Python program is loaded automatically into the editor. Edit the program, provide input if required and click Run.

The compiler is embedded using OneCompiler. Your Python program runs inside the embedded Python environment; Study Glance does not execute Python code directly on your web server. MATLAB programs shown in the experiment should be run in MATLAB (or GNU Octave), and programs that use libraries such as NumPy, SciPy or SymPy depend on what the embedded environment provides.
โ† Back to Computational Mathematics Lab ๐Ÿ“š All Lab Manuals