Skip to main content
1-Visitor
August 25, 2015
Solved

Convert 1x1 vector to scalar in if statement

  • August 25, 2015
  • 1 reply
  • 2998 views

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?

Best answer by StuartBruff

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

1 reply

23-Emerald V
August 25, 2015

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

dsochor1-VisitorAuthor
1-Visitor
August 25, 2015

Thank you Stuart

23-Emerald V
August 25, 2015

No worries, Daniel.