Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix syntax in shell #43

Open
4 tasks
tudny opened this issue Feb 2, 2023 · 0 comments
Open
4 tasks

Matrix syntax in shell #43

tudny opened this issue Feb 2, 2023 · 0 comments
Labels
enhancement New feature or request NITD Not intended to be developed during the JNP3 project.

Comments

@tudny
Copy link
Collaborator

tudny commented Feb 2, 2023

Add support for matrices creation in shell.
TODO:

  • Write BNF rules for a matrix
  • Add those rules to parser
  • Add unit tests
  • Add documentation in GUIDE.md

Example of syntax (based on MATLAB):

% Matrix with two rows. Each row has two elements. First row [1, 4], second [3, 2]
[1 4; 3 2]
% Matrix with two rows. Each row has three elements. First row [-1/2, 5/4, 5/2], second [1/2, 13/17, -9/2]
[-1/2 5/4 5/2; 1/2 13/17 -9/2]
% Matrix with one row. This row has three elements. It contains of [a, -3/2, x]
[a -3/2 x]

This syntax does not allow arithmetic expressions apart from scalars and variables, as e.g., expression

[3/4 -2/1]

can be interpreted either as [3/4, -2/1] or [-5/4].

@tudny tudny added enhancement New feature or request NITD Not intended to be developed during the JNP3 project. labels Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request NITD Not intended to be developed during the JNP3 project.
Projects
None yet
Development

No branches or pull requests

1 participant