Pages

Thursday, October 18, 2012

Simplest matlab commands

Want to write that exp(j*t) into cos and sines?

Use the command simple

http://www.mathworks.com/help/symbolic/simple.html

What to see the results in decimals instead of fractions?

Use vpa(ans,4)

What evaluate a function with symbolic expressions?

Use subs(f)

Want to see pretty picture of your complicated equation?

type mupad

Nested symbolic sums?

Go to the mupad and type for example,
sum(sum(sum(1,i=1..j),j=n..N),n=1..N)


State Space modelling?

Step Response - http://www.mathworks.com/help/control/ref/initial.html

Impulse Response - http://www.mathworks.com/help/control/ref/impulse.html

e.g.
a = [-0.5572 -0.7814;0.7814  0];
b = [1 -1;0 2];
c = [1.9691  6.4493];
sys = ss(a,b,c,0);
impulse(sys)

Initial-
http://www.mathworks.com/help/control/ref/initial.html

No comments:

Post a Comment