Problem 44274. Calculate the sum of two polynomials
Calculate the sum of two polynomials if they are written in notation with their coefficients.
example:
(
) + (
) = ![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPcAAAAmCAYAAAAY7g3ZAAAHHUlEQVR4Xu2cOagtRRCGz8sVt0gDFTVQEBRcURQ1UBBFRNyTF4gbiIEoPgO5GKhoIGLggsHDBVwwMBE0MFAEV9BIAxUU0cgNzfX/HlPQjjPndE93zz23pwaKe+453TPd/9RfXV1VM/tWfjgCjkCTCOxrclY+KUfAEVg5uV0JHIFGEXByN3pjfVqOgJPbdcARaBSBGuS+UVjtSE7tMHtPf2+W/NYohlOmdbQ6PSu5SHKs5O/u/wemnMz7OAJDCJQmN8R+SvKI5HvJfZLLJZ9IzvdbcAgBiP2R5APJW5KzJA9JDnOcXENKIlCa3B9rcLdKvgsG+XO3Oh2jv756r1YHhMOJkjsCjM7R50+7/8/V389K3mQ/1zIRKEluVqSTBxQTwh8vOd3JfUjJ3pXc3TOAfP+1hK3MTZLXl6mOPuuSCJQk99C4IPwPkvslz5UceKFzMb5fE851V8V5YATPk+yVlRtD/qjkSMkVCRjSNKdv4qW2svmdGtXDkmskqV5adN+a5LagEeiyF9/GAxcZBY05CHqdKQm3HDH9YtuwfeHYdg/HiHlDN14CprHkzukbi+M2tzNiEkTlSDHkyX1rkRvS3COxSbyxpQSHUD9KCAL+PqIVBLwwADWDgij9t5KankEJpee+YuBYrQmUcsSSO6dvibHv5jmIqdzWDeAW/SV4GkvuyX1rkZuBs3I/KMEl58C6owg5BxN9RvJnd76cc1nK7kKdZF2g73n9frukJvHYY0OYUilDrPx+CRH5kuk1jJB5Lv904MeSO6dvzn1O7cv9PkOCwS8V+wjn/kTAiZiVe3LfmuQ2UM31fbKAorFaEJDCRT489a712kMA0nWbDA6rO9eq5ZIzp6clVwXEyZzayhQolnhTrpdK7vAaOX2njDWlj8U+SE8+ltIxsm0qucPTJvWdg9wMjpv5giRM/0Ri8Z9mJckdc31LUX2jxqfFdE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XflGIJX/IATmFVHmMPjSA48XCIGchNcyzxe21yhzGY1NhEbF+e/qMtBxiz1Qk9HzOg/A7GPApcwjOqTe4wZpAa7U/q29+v2FNKlPHhevdfdgiQdoGx30so526R21zyTXtljBzVUbjvGALIHm5LQhyHfq+JEeeuRW7z1Ix0Ng/IRSntupr41L42hyFic127B3zuEz8H3xrkRh/w2q6W2AtMbIxsab9cY5gm9y0djMgBNaavPYRBW39V8jhi9rIGKuRq5dpj7tdebGMvaziowW/je/+iMd1r5I6emDd0BJaOgJN76Rrg828WASd3s7fWJ7Z0BJzcS9cAn3+zCDi5m721PrGlI+DkXroG+PybRcDJ3eyt9YktHQEn99I1wOffLAL/AqwXL0WK9YJJAAAAAElFTkSuQmCC)
a=[3 4 5];
b=[1 4 7 6];
output =[1 7 11 11];
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers74
Suggested Problems
-
Magic is simple (for beginners)
8728 Solvers
-
389 Solvers
-
723 Solvers
-
Switch matrix to a column vector
347 Solvers
-
Matlab Basics II - Max & Index of Max
248 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!