How to define a symbolic vector?

I would like to define a symbolic vector like y = [0 1]*x where x is [x1 ; x2]. So basically y actually equals to x2. Is it possible?

 Accepted Answer

Yes!
syms x1 x2
x = [x1; x2]
y = [0 1]*x
produces:
y =
x2

More Answers (0)

Categories

Asked:

on 12 Oct 2014

Answered:

on 12 Oct 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!