from Hz to radiant

3 次查看(过去 30 天)
Paul Rogers
Paul Rogers 2020-10-15
回答: Alan Stevens 2020-10-15
Hi everyone, this is a simple one.
Is the argument coorrect in this code?
gammaT_max = 0.8;
gammaT_min = 0.65;
f=50;%hz
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

采纳的回答

Alan Stevens
Alan Stevens 2020-10-15
Yes, though it would be more elegant to use 2*pi instead of 6.28.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Identification 的更多信息

产品


版本

R2014b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by