How to solve recurrence relations (repeted roots)?
Show older comments
clc;clear all;
syms n
P=input('Coefficients of the polynomial P =[...]= ');
k=length(P)-1;
R=roots(P);
a=input('Base cases a = [...] = ');
C=transpose(fliplr(vander(R)));
b=inv(C)*a'
fn=dot(b,R.^n)

This script do the first sum, I need to code the second one, any tip/help?
Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!