0<= t <= y in matlab

You can use a conditional statement in Matlab to check if t is between 0 and y. Here's the code:

main.m
if t >= 0 && t <= y
    disp('t is between 0 and y')
else
    disp('t is not between 0 and y')
end
99 chars
6 lines

The && operator combines two conditions. In this case, it checks if both t >= 0 and t <= y are true. If they are, the first message is displayed. If not, the second message is displayed.

gistlibby LogSnag