KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
cosine-wave-plot
★ 17
Open GitHub ↗
No description available.
Download README (.md)
Explore Similar Repositories
CodeWalker.API
:
Local API for Codewalker to automate model extraction.
PolyflowAutoBot-NTE
:
No description available.
XCXDE-ModLoader
:
exlaunch plugin for loading files outside of sts.ard in Xenoblade Chronicles X: Definitive Edition
tauri-plugin-machine-uid
:
Tauri Plugin for retrieving machine UID
FsMath
:
FsMath is a lightweight maths library designed for modern F# workflows
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
cosine-wave-plot
?
Download (.md)
# cosine-wave-plot import numpy as np import matplotlib.pyplot as plt def plot_cosine_wave(frequency=1, amplitude=1, phase=0, duration=2, sample_rate=1000): """Plots a cosine wave with given parameters.""" t = np.linspace(0, duration, duration * sample_rate) y = amplitude * np.cos(2 * np.pi * frequency * t + phase) plt.figure(figsize=(8, 5)) plt.plot(t, y, label=f'Cosine Wave: {frequency}Hz') plt.axhline(0, color='black', linewidth=0.5) plt.axvline(0, color='black', linewidth=0.5) plt.grid(True, linestyle='--', linewidth=0.5) plt.legend() plt.title("Cosine Wave") plt.xlabel("Time (s)") plt.ylabel("Amplitude") plt.show() # Example usage if __name__ == "__main__": plot_cosine_wave(frequency=2, amplitude=1, phase=0)