gistlib
You can create a function with the specified expression using the following code:
main.mfunction [y] = xt(t) y = 3*exp(-1.5*t)*sin(2*t)*cos(4*t); end 66 chars4 lines
function [y] = xt(t) y = 3*exp(-1.5*t)*sin(2*t)*cos(4*t); end
Save the file with any name (let's say myFunc.m) and call it from wherever you want by using myFunc(t).
myFunc.m
myFunc(t)
gistlibby LogSnag