How can I put subscripts on a polynomial of degree n?

I want to the following polynomial, to write the input argument p,with subscripts:
y=p1*x^n+p2*x^(n-1)+...+pn+1,
not the way it is written.

4 commentaires

That answer was not helpful,because I want the subscripts to be written,below and on the right, in each p,with smaller characters than p.
"Smaller characters" is a matter of display, not a matter of computation. In order for us to tell you how to achieve the display you desire, you need to specify how you are doing the displaying.
Stephen23
Stephen23 le 25 Août 2017
Modifié(e) : Stephen23 le 25 Août 2017
"That answer was not helpful..."
Your question is unclear. Raw text does not have subscripts, superscripts, or any other formatting. Like most programming languages MATLAB is written in raw text. If you want to display that formula with subscripts then you need to tell us where you want to display it.
Note: the Extended Symbolic Math Toolbox has been obsolete since R2008a, so if that is what is being used it should be emphasized as the display options have changed.

Connectez-vous pour commenter.

Réponses (1)

N = 10;
P = sym('p', [1, N]);
syms x
y = poly2sym(P, x);

Catégories

En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by