Skip to main content
1-Visitor
Aug 25, 2015 3:55 PM UTC
Solved

Convert 1x1 vector to scalar in if statement

In the attached Prime worksheet I am trying to use the "logical or" function within a nested if statement. I believe the error is due to db being a 1x1 vector. Is there a way to convert this from a 1x1 vector to a scalar value?

23-Emerald V
Aug 25, 2015 4:35 PM UTC

Daniel Sochor wrote:

...r. Is there a way to convert this from a 1x1 vector to a scalar value?

Just use the standard vector index ... v[0

Stuart

3 replies

23-Emerald V
Aug 25, 2015 4:35 PM UTC

Daniel Sochor wrote:

...r. Is there a way to convert this from a 1x1 vector to a scalar value?

Just use the standard vector index ... v[0

Stuart

Translate
dsochor1-VisitorAuthor
1-Visitor
Aug 25, 2015 9:13 PM UTC

Thank you Stuart

Translate
23-Emerald V
Aug 25, 2015 9:19 PM UTC

No worries, Daniel.

Translate