MATLAB: Plotting Radians in MATLAB

plotting radians in matlab

Hello, I am trying to plot the following equation to obtain a graph: v(t)=5sin(ω*t+90degrees). I know values have to be in radians in order for MATLAB to compute it. any suggestions on how to write this codes of functions? can i use symbols such as ω and the variable t?

Best Answer

You can specify omega and t then calculate v:
t = linspace(0, 5, 400); % 400 elements from 0 to 5
omega = 4; % Whatever. Units of degrees per second.
v = 5 * sind(omega * t + 90); % Sind() takes values in degrees instead of radians.