About 263,000 results
Open links in new tab
  1. Triangle wave shaped array in Python - Stack Overflow

    Mar 1, 2015 · You can simply use traditional trig functions (arcsin and sin) from the math library to create a triangle-wave as a function of x and call it inside a list comprehension that loops over …

  2. Use Python3 to Model and Visualize Harmonic Waveforms

    Jun 10, 2020 · This article summarizes and provides a simple Python script that can be used to model and visualize such waveforms. Both square and triangle waves can be easily …

  3. Easily generate square/triangle/sawtooth/inverse sawtooth waveform

    Dec 31, 2018 · Easily generate square/triangle/sawtooth/inverse sawtooth waveform data in Python using UliEngineering In a previous post, I’ve detailed how to generate sine/cosine …

  4. How to generate and plot a triangle wave using python and …

    Dec 18, 2018 · I would like to generate and plot a triangle wave of the amplitude of 2V and the frequency of 1 Hz using python. I would like to know the code thats does that as well as a …

  5. numpy - Plot Square Wave in Python - Stack Overflow

    Feb 1, 2021 · You could use the square function from scipy.signal. from scipy import signal import matplotlib.pyplot as plt t = np.linspace(0, 1, 500, endpoint=False) plt.plot(t, signal.square(2 * …

  6. A simple wave generator written in Python 3 - GitHub

    This is a wave generator that can generate sine, sawtooth, triangle and square waves. Using command line parameters, you can modify the wave type, the frequency and the play time. …

  7. square — SciPy v1.15.2 Manual

    A pulse-width modulated sine wave: >>> plt . figure () >>> sig = np . sin ( 2 * np . pi * t ) >>> pwm = signal . square ( 2 * np . pi * 30 * t , duty = ( sig + 1 ) / 2 ) >>> plt . subplot ( 2 , 1 , 1 ) >>> plt …

  8. How can one generate triangular and sawtooth waves in python?

    Sep 25, 2019 · How can one generate triangular and sawtooth waves in python? I finally found out how to use python to make .wav files. It requires the modules numpy and scipy (the latter …

  9. Generate periodic square and triangle waves using python

    Mar 19, 2025 · This article explains how to generate periodic square and triangle waves in Python. The functions used are signal.square and sawtooth from scipy.

  10. Simple Wave Generation In Python (and SciPy) - Hackaday

    Jun 27, 2017 · [153Armstrong] shows simple formulae for sine waves, symmetric and asymmetric square waves, and a sawtooth wave, using generators provided by the SciPy package.

Refresh