Difference between revisions of "Triwave.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Normalise sequential blank lines)
m (Rename Arguments section heading to Parameters)
Line 6: Line 6:
 
       waveform=triwave(amplitude,frequency,time_grid)
 
       waveform=triwave(amplitude,frequency,time_grid)
  
−
==Arguments==
+
==Parameters==
  
 
       amplitude  -  amplitude at the tooth top
 
       amplitude  -  amplitude at the tooth top

Revision as of 18:52, 5 June 2026

Returns a triangular waveform.

Syntax

     waveform=triwave(amplitude,frequency,time_grid)

Parameters

     amplitude  -  amplitude at the tooth top

     frequency  -  waveform frequency, Hz

     time_grid  -  grid of time points, seconds

Outputs

     waveform   -  waveform array of the same shape
                   as the time_grid input

Examples

 >> t=linspace(0,1,1000);
 >> w=triwave(1,10,t);
 >> plot(t,w);

Triwave.png

See also

chirp_pulse.m, pulse_shape.m, sawtooth.m, vg_pulse.m, shaped_pulse_xy.m, shaped_pulse_af.m

Shaped pulses and gradients

Version 2.4, authors: Ilya Kuprov