Created
July 10, 2024 15:16
-
-
Save developertugrul/87f54536ff208a4310966c56fb65185f to your computer and use it in GitHub Desktop.
İstiklal Marşı notalarının matematiksel olarak zaman ve frekansı kullanılarak grafik üzerinde gösterimi.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Zaman aralıkları ve frekans değerlerini tekrar gözden geçirip düzenliyoruz | |
# Zaman aralıkları | |
time_intervals = [0, 0.5, 1, 2, 3, 3.5, 4, 5, 5.5, 6, 7, 8, 8.5, 9, 10, 10.5, 11, 12, 13, 13.5, 14, 15, 15.5, 16, 16.5, 17] | |
# Frekans değerleri | |
frequencies = [329.63, 369.99, 392.00, 440.00, 493.88, 523.25, 587.33, 523.25, 493.88, 440.00, 392.00, 369.99, 329.63, 293.66, | |
329.63, 369.99, 392.00, 440.00, 493.88, 523.25, 587.33, 523.25, 493.88, 440.00, 392.00, 369.99] | |
# Zaman ve frekans listelerinin uzunluklarının aynı olmasını sağla | |
if len(time_intervals) == len(frequencies): | |
# Zaman değerleri | |
times = np.array(time_intervals) | |
freqs = np.array(frequencies) | |
# Grafik çizimi | |
plt.figure(figsize=(10, 6)) | |
plt.step(times, freqs, where='post') | |
plt.xlabel('Zaman (saniye)') | |
plt.ylabel('Frekans (Hz)') | |
plt.title('Türk İstiklal Marşı - İlk İki Dörtlük Frekans ve Zaman Grafiği') | |
plt.grid(True) | |
plt.show() | |
else: | |
print("Zaman ve frekans listeleri aynı uzunlukta olmalıdır.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment