How can I put subscripts on a polynomial of degree n?
Afficher commentaires plus anciens
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
Theodoros Vassilakis
le 25 Juil 2015
Walter Roberson
le 25 Juil 2015
"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.
"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.
Walter Roberson
le 25 Août 2017
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.
Réponses (1)
Walter Roberson
le 25 Juil 2015
N = 10;
P = sym('p', [1, N]);
syms x
y = poly2sym(P, x);
2 commentaires
Walter Roberson
le 25 Juil 2015
Andreas Sorgatz
le 25 Août 2017
Or just enter this code in MATLAB Live Editor.
Catégories
En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!