MATLAB: Is it possible to make an if-statement with multiple conditions (a vector of numbers)

caesar cipherdecryptifif statementmultiplemultiple conditions

Is it possible to make an if-statement with multiple conditions? I want the value of B(1, i) to change if it's any of the numbers 65 to 90. It does not work to simply type "if B(1, i)==65:90".
%Text that I want to decrypt
A=['VYDQBBO OEK CQDQWUT JE TUSHOFJ JXYI JUNJ!'];
B=double(A);
l=length(B);
x=(65:90);
%Loop to roll every letter 10 steps forward in the alpabet
for i=1:l
if (B(1, i)==x)
B(1, i)=(B(1, i)+10);
disp(B(1, i));
if (B(1, i)>90)
B(1, i)=B(1, i)-26;
end
end
end
A2=char(B);
disp(A2);

Best Answer

Use any:
if any(B(1,i)==65:90)
if ismember(B(1,i),65:90)