Indexing polynomials using 'for' loop
Ältere Kommentare anzeigen
I need help about an exercise that I've been given from my professor. Six polynomials are given:
- p1 = [0 2 0 -2 6 -1]; % the first polynomial is p1(x)=2x^4-2x^2+6x-1
- p2 = [1 3 0 -2 0 0]; % the second polynomial is p2(x)=x^5+3x^4-5x^2
- p3 = [0 0 3 1 0 -10]; %...
- p4 = [0 0 0 -4 16 -5]; %...
- p5 = [1 -1 0 1 0 -1];
- p6 = [3 -12 0 0 0 7];
Using 'polyval(p(i),2/3)' function I should create new vector 'A' that contains all the values of the polynomials from 'p1' to 'p6'(i=1:6) for x=2/3. Then find the minimum and maximum value of the vector. I want to know how can I loop through the polynomials to find their value and put that value in the new vector. Thank you in advance.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Polynomials finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!