i am trieng to draw with matlab the two functions :
y1=ln(n!)
and y2=ln(n)*n
when n is a vector like this : n=1:100
i want to draw both of these functions in the same graph , and then draw another function : ((y2-y1)/y1)
on a different graph .. i did the following but it only shows me the first graph with only one function , any help of what i am doing wrong ? thanks.
n=1:100;
format long
n_factorial=factorial(n);
y1 =log(n_factorial);
figure;
loglog(n,y1,'b');
hold on;
y2=(n*(log(n)'));
loglog(n,y2,'r');
y3=((y2-y1)/y1);
loglog(n,y3);