omega = 2*pi in matlab

You can define the variable omega to 2*pi in MATLAB as follows:

main.m
omega = 2 * pi;
16 chars
2 lines

Alternatively, you can use the built-in constant 2*pi instead of defining a new variable:

main.m
omega = 2 * pi;
16 chars
2 lines

Both methods will give you the same result: the value of omega will be set to 6.283185307179586.

related categories

gistlibby LogSnag