Skip to content

Slauva/Matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linear Algebra: Matrix operations

Table of Contents

About

A simple console application that allows you to calculate sum, difference, product and transposition over matrices.

Getting Started

All source .cpp files are located in the src folder. Header files .h in the include folder. The finished .exe application in the output folder. If you want to extend the project with any libraries, then they can be located in the lib folder. There is a Makefile collector for building projects.

Prerequisites

What things you need to install the software and how to install them.

cd ~/output
start main.exe

Installing

To build a package

cd ~/project name
make

End with an example of getting some data out of the system or using it for a little demo.

Usage

For test code you can use the template

#include <iostream>

#include "../include/Matrix.h"

int main() {
    int w, h;

    std::cout << "Enter width of matrix: ";
    std::cin >> w;
    std::cout << "Enter height of matrix: ";
    std::cin >> h;
    Matrix a(w, h);
    std::cin >> a;

    int w1, h1;

    std::cout << "Enter width of matrix: ";
    std::cin >> w1;
    std::cout << "Enter height of matrix: ";
    std::cin >> h1;
    Matrix b(w1, h1);
    std::cin >> b;

    Matrix sum = a + b;
    Matrix sub = a - b;
    Matrix mul = a * b;
    Matrix ass = a;

    std::cout << sum;
    std::cout << sub;
    std::cout << mul;
    std::cout << ass;

    ass.transpose();
    std::cout << ass;

    std::system("pause");

    return 0;
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published