Giter VIP home page Giter VIP logo

matlab-simulator's People

Contributors

abdelrhmanmagdy avatar hadihebat avatar mamdouhrelnakeeb avatar mennaehab avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

matlab-simulator's Issues

evaluation postfix

evaluation postfix function taken postfix input format in string and return CMatrix object as a result

Power Functions

The function should get a matrix then evaluate one of the two cases:

  • Evaluate multiply the matrix by itself according to power value.
  • Evaluate the power of each item in the matrix.

For ex:
A =
1 2
3 4

A^2 =
7 10
15 22

A .^2 =
1 4
9 16

error handling

handling different error may happened and throw error massage and catch it
sample errors:
A = [1 2; 3]
B = 5 / 0
C = 3 * (2 + 4 +

Flexible Matrix Parsing

The program should accept:

  • Matrix in matrix.

For ex:
B = [4 5;6 7]
C = [8;9]
A = [1 2 3;B C]
or
A = [1 2 3;[4 5;6 7] [8;9]]
A =
1 2 3
4 5 8
6 7 9

  • Expressions.
    -- Parse it and use Mathematical Expressions Functions.

For ex:
A = [1 2; 4 15/(2.1+10*sin(0.12))]
A =
1.0000 2.0000
4.0000 1.4266

Mathematical Expressions

Parse String mathematical expression and evaluate the operations through their functions and be aligned with Polish Notation issue.
for ex:
L = (1.2 + 3.4 - 5.6) / (2.1 * 3.2 + 4.6) - 12.1 * 3.1 + (1.2 + 5.2) ^ (4 / (3.2+5.6))

The function should get each single expression and evaluate it separately.

Trigonometric Functions

The function should get a matrix and evaluate the value of each item in the matrix

For ex:
A =
1 2 3
4 5 6

sin(A) =
0.84147 0.90930 0.14112
-0.75680 -0.95892 -0.27942

For now we will implement sine and cosine only.

Default Matrices

Default Matrices are rand, eye, zeros and ones

These functions should get number of rows and columns then construct a matrix of this size and fill matrix items according to its type.

for ex:
// Random Numbers
D = rand(3,3)
D =
0.24757 0.74756 0.98016
0.69369 0.63851 0.72111
0.91013 0.58112 0.13993

D = eye(3,3)
D =
Diagonal Matrix
1 0 0
0 1 0
0 0 1

D = zeros(3,3)
D =
0 0 0
0 0 0
0 0 0

D = ones(3,3)
D =
1 1 1
1 1 1
1 1 1

Logarithmic Functions

The function should get a matrix and evaluate the value of each item in the matrix

For ex:
A =
1 2 3
4 5 6

log(A) =
0.00000 0.69315 1.09861
1.38629 1.60944 1.79176

Root function

The function should get a matrix and evaluate the root value of each item in the matrix

For ex:
A =
1 2 3
4 5 6

sqrt(A) =
1.0000 1.4142 1.7321
2.0000 2.2361 2.4495

Error Handling

handle more edge cases in the code and throw string errors that describe what happens.

Polish Notation

The function should receive a Mathematical Expression then evaluate it according to its priorities.

For ex:
A = 5.5 + 12 * sin(0.4) + 2.2^4
A = 33.599

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.