MATLAB: How do i find the max value of xvec

max variable

x=vo*cosd(theta)*t;
x=x*1.0936;
i=1:length(t)-1;
xvec=[x(i) x(i+1)];

Best Answer

The maximum value of a vector constructed with copies of all of x inside it cannot be any different than the maximum value of x, so just use max(x)