I Units of Amplitude & Frequency in Coding (n=0 to 52920)

AI Thread Summary
The discussion centers on the coding snippet that generates a sine wave using amplitude and frequency, questioning the units of amplitude and the resulting value F. Frequency is confirmed to be in Hertz (Hz), but the units of amplitude and F remain ambiguous since they depend on the physical quantity being represented, which could vary widely. The sine function itself does not have units, implying that F and amplitude share the same units, yet without context, their specific units cannot be determined. The conversation highlights the importance of knowing the source of the signal, such as whether it originates from a microphone or sensor, to clarify the units involved. Ultimately, without additional context, the units for amplitude and F cannot be definitively established.
btb4198
Messages
570
Reaction score
10
for (int n = 0; n < 52920; n++){
F = Amplitude * sin(2 *pi*n* Frequency/44100) ;
}
what are the units of Amplitude ?
I know Frequency is in Hz
also what are the unit of F?
 
Physics news on Phys.org
It appears to be an expression for the instantaneous values of something which varies sinusoisally. But without know what that thing is, we can't tell the units.

It could be a swing. It could be electrical current, or voltage or power. It could be the height of a liquid. It could be almost anything.
 
The sine doesn't have units, so F and Amplitude have the same units. But what those units are, depends on what physical quantity you're describing, as anorlunda said.
 
what if it is a sound wave?
 
btb4198 said:
what if it is a sound wave?

That's still not enough. You're not going to get anywhere asking people to guess.

Does the signal come from a microphone or a pressure sensor? Information like that will provide your answer.
 
so that signal I posted, is just a sinewave I make up. I did not get it from anywhere...
 
btb4198 said:
so that signal I posted, is just a sinewave I make up. I did not get it from anywhere...
So there is no answer to your question. :smile:
 
btb4198 said:
that signal I posted, is just a sinewave I make up
Then you can make up the units as well.
 
Back
Top