![]() ![]() The polynomial can then be reconstructed via: sum(c.*prod(repmat(v,).^degs,2))īy the way, good choice on where you go to school. M = eval(feval(symengine,'poly2list',p,v)) ĭegs = m(:,2:end) % Degree of each variable in each term If you want to extract all of the information from the polynomial, the poly2list function is quite helpful: syms x y Here is how you can use MuPAD's coeff to get the coefficients in terms of the order of variable they precede ( x or y): syms x y If you actually need to handle polynomials in multiple variables, you can use MuPAD functions from within Matlab. MATLAB: How to solve the Euler-Lagrange equation in the Symbolic Toolbox 5.3 (R2009b) dependent equation euler-lagrange Symbolic Math Toolbox variable Does the Symbolic Toolbox in MATLAB have a function that performs what the function 'EulerEquations' in Mathematica does, in order to compute the differential equation obeyed by the integrand of. ![]() If you're going to be working with polynomials it would probably also be a good idea not to create a variable called poly, which is the name of a function you might want to use. Use fliplr(c) if you really want the coefficients in the other order. You can use sym2poly if your polynomial is a function of a single variable like your example y^2: syms y ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |