MATLAB: From Hz to radiant


Hi everyone, this is a simple one.
Is the argument coorrect in this code?
gammaT_max = 0.8;
gammaT_min = 0.65;
w=f*6.28; %rad/s
A = (gammaT_max - gammaT_min)/2; %ampiezza
b = gammaT_max - ((gammaT_max - gammaT_min)/2);
gammaT = A*sin(w*z(2))+b
I just want to make sure the dimensions are ok. It should be fine, but I am not sure.
I have Matlab 2014b

Best Answer

  • Yes, though it would be more elegant to use 2*pi instead of 6.28.