Understanding the conditional output beginning with (t == 0 | v == 0)

조회 수: 2 (최근 30일)
Vincent Ike
Vincent Ike 2022년 7월 26일
댓글: Vincent Ike 2024년 5월 29일
Upon integrating a time dependent variable, an exerpt to my solution contains the following: (t == 0 | v == 0) & m ~= n & m + n ~= 0 & 0<= v*t, the solution... I seem to understand every other thing except for this (t == 0 | v == 0). I need an explanation to (t == 0 | v == 0) please. Thank you.

채택된 답변

David Hill
David Hill 2022년 7월 26일
logical (t==0 or v==0)
t=randi(5,1,20)-1
t = 1×20
2 3 3 1 2 4 3 3 3 0 3 4 4 4 1 3 1 2 0 4
v=randi(5,1,20)-1
v = 1×20
4 2 1 0 0 0 0 2 1 2 1 0 4 4 4 3 2 3 0 4
idx=(t==0|v==0)
idx = 1×20 logical array
0 0 0 1 1 1 1 0 0 1 0 1 0 0 0 0 0 0 1 0

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by