Sum of vector involving relational operations

1 Ansicht (letzte 30 Tage)
lauuser1
lauuser1 am 25 Feb. 2016
Kommentiert: Star Strider am 25 Feb. 2016
When given something such as
x=[0:.5:10]'
why does
sum(x>8 & x<=4) = 0

Akzeptierte Antwort

Star Strider
Star Strider am 25 Feb. 2016
Think about it. Here no ‘x’ can simultaneously be >8 and <=4.
  2 Kommentare
lauuser1
lauuser1 am 25 Feb. 2016
Oh okay, I get it. Thank you!
Star Strider
Star Strider am 25 Feb. 2016
My pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by