View Single Post
Sep6-08, 12:32 PM   #2
 
Recognitions:
Gold Membership Gold Member
Science Advisor Science Advisor
Hi Skyeagle,

Comsol syntax is pretty much identical to that of Matlab (well they share plenty of history) ..... so for your equation you might try something like:

(10^7)*exp((-10^3)*x^2)*(t<=2)

I'm assuming what you're after with the "x" is a cartesian coordinate (or that is how comsol would interpret from the above)? The "t<=2" evaluates as "1" for t <=2 (assuming your t is in seconds) and 0 otherwise (you can do the same thing with a simple "if" - construct or use several of the other available step - function - lookalikes, if you for example wish to smoothen the transition to 0 value).