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

[Question] Defining linear algebra vectors and matrices with arbitrary dimensions #337

Open
jeksterslab opened this issue Sep 26, 2021 · 1 comment
Labels

Comments

@jeksterslab
Copy link

This is more of a question than an issue really. I tried to look at the Google group, but there seems to be a lack of activity there so I am asking the question here. I'll remove the issue if this is not the appropriate place.

Let's say I wish to symbolically get the gradient and the hessian matrix of the log likelihood of the multivariate normal distribution in a general sense without specifying the p dimensions, is there a way to define vectors and matrices without defining the dimensions? Can I define the p by 1 the vectors x and mu and the symmetric positive p by p matrix Sigma without defining p first?

Thanks for all the work on yacas.

Jek

@grzegorzmazur
Copy link
Owner

Hi,

This is a very good place, the group seems to be in coma unfortunately.

Unfortunately, what you want to achieve is not not going to be simple in yacas, and AFAIK in majority in symbolic algebra packages. In yacas a vector is just a list of expressions, so it must have a well defined size (dimension). The same holds for matrices which are just lists of rows, which in turn a lists as well.

What described is doable by defining a function which would contain a description of how to generate results and could generate them once the arguments are set to specific values, but I don't know enough about what you want to achieve to say whether this approach would work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants