On Sep 2, 2008, at 6:25 AM, wxiewen wrote:
>   I want to simulate a non-linear structure that I have to set a  
> source whose amplitude is time-varying.
>  The form I want to set is as folllowing
>
> |\ amplitude
> |       /\
> |      /  \
> |     /    \
> |    /      \
> |   /        \
> |  /          \
> | __________________________\ time
>
> I use custom-src, but I have no idea about how to define a source  
> with two section via one function .

Use an "if" statement if you want to define your function piecewise.   
e.g.

(define (my-source t)
    (if (< t 100)
        ... first function....
        ....otherwise, second function....))


_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to