higher order polynomial expression
Mostra commenti meno recenti
I want to implement matlab code for set of 11 polynomials expression and upto 3rd order derivatives. I want to solve this equation with intergration of all 11 set of polynomials. eg. K = intergration with limit 0 to 1 (ai(x) bj(x) dx), where i = 0 and j = 0 to 11
I have created this:
%Some Polynomials defined over the interval[0,1]
i want this as ai(x) and i = 0 means N0 should be selected
N0 = [0 0 0 0 0 0 0 0 0 0 1 -1 0];
N1 = [0 0 0 0 0 0 0 0 0 1 -1 0 0];
N2 = [0 0 0 0 0 0 0 0 1 -1 -1 1 0];
N3 = [0 0 0 0 0 0 0 1 -1 -3 0 3 0];
N4 = [0 0 0 0 0 0 1 -1 -6 6 3 -3 0];
N5 = [0 0 0 0 0 1 -1 -10 10 15 -15 0 0];
N6 = [0 0 0 0 1 -1 -15 15 45 -45 -15 15 0];
N7 = [0 0 0 1 -1 -21 21 105 -105 -105 105 0 0];
N8 = [0 0 1 -1 -28 28 210 -210 -420 420 105 -105 0];
N9 = [1 -10 -36 36 378 -378 -1260 1260 1260 945 -945 0 0];
N10 = [1 -1 -45 45 630 -630 -3150 3150 4725 -4725 -945 945 0];
%1st order
for bj(x) this 1st order should be selected in an integration. and j = 0 to 11 means N01 to N101
N01= polyder (N0)
N11= polyder (N1);
N21= polyder (N2);
N31= polyder (N3);
N41= polyder (N4);
N51= polyder (N5);
N61= polyder (N6);
N71= polyder (N7);
N81= polyder (N8);
N91= polyder (N9);
N101= polyder (N10);
in above first order size of row vector is also changes
please help me with this code.
Thank you in advance!
4 Commenti
John D'Errico
il 18 Mag 2020
Modificato: John D'Errico
il 18 Mag 2020
Hint: this is why you don't create numbered variables as you want to do. MATLAB is not a spreadsheet. It does not work well as a spreadsheet, though people seem to love to try exactly that.
Instead, learn to create vectors and arrays. Learn about cell arrays, although in this case, a simple matrix seems like it would be sufficient, since you seem to have a rectangular array of polynomial coefficients.
That you want to compute up to the third derivative of high order polynomials is a dangerous thing, probably leading to numerical garbage as a result. But what can I say there? People do all sorts of things I think strange. Your choice.
One last point - the word is integration, not intergration. A pretty minor point, I'll admit.
TAGNE NOUMBISSI ROMUALD
il 18 Mag 2020
I would like in the measure of the possible to have an example of code on the numerical asymptotic method treating the problems of nonlinearity in physics (method based on the assumption of the unknowns like a series of development of Taylor) as similarly treats your code here- above
thank you in advance
thanks
Hirenkumar Tailor
il 18 Mag 2020
Hirenkumar Tailor
il 18 Mag 2020
Risposte (0)
Categorie
Scopri di più su Polynomials in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!