column vector with specific entries for first 4 terms

4 Ansichten (letzte 30 Tage)
Vincent Gambuzza
Vincent Gambuzza am 14 Mär. 2019
Bearbeitet: madhan ravi am 23 Mär. 2019
I need to make a 16x1 column vecor that is in the following form:
coeff = [-x;-2x;-3x;-4x;0;0;0;0;0;0;0;0;0;0;0;0]
help would be greatly apprecited!
thanks!

Antworten (1)

madhan ravi
madhan ravi am 15 Mär. 2019
Bearbeitet: madhan ravi am 23 Mär. 2019
syms x % just define x as symbolic variable
Coeff = sym(zeros(16,1));
Coeff(1:4) = (-(1:4).*x).'

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by