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

Array_not_Matrix: can reference 1x1 Array #1232

Open
cbm755 opened this issue Sep 7, 2022 · 0 comments
Open

Array_not_Matrix: can reference 1x1 Array #1232

cbm755 opened this issue Sep 7, 2022 · 0 comments

Comments

@cbm755
Copy link
Collaborator

cbm755 commented Sep 7, 2022

Consider

>> syms x
>> e = [x==3 x>=2]
ans = (sym) [[x = 3  x ≥ 2]]  (1×2 matrix)

So far so good, but index one of those out:

>> e(2)
ans = (sym) [[x ≥ 2]]

The result is a 1x1 Array. Compare to:

>> x >= 2
ans = (sym) x ≥ 2

We try to avoid making 1x1 Matrices in Symbolic (even though SymPy happily will) b/c of Octave double behaviour. Probably need to do something similar for Array...

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

No branches or pull requests

1 participant