Question: Following application - plot isn't working

Just following through the 'Why is the minimum payment on a credit card so low' application and I get to plot and it doesn't work.  Why doesn't it work?  If I run through these lines as shown in the application I end up at plot as unable to evaluate. 

restart;

balance := (n, r, p, b)->b*(1+r)^n - p * sum((1+r)^i,i=1..n);

balance(12, .015, 30, 1000);

solve( {balance(n, r, p, b) = 0}, n);

N := unapply(%, r, p, b);

N(.02, 30, 1000);

plot( N(.02, p, 1000), p = 1..50);

And I get        Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

 

Please Wait...