clc; clear all; close all; 
set(0,'DefaultAxesFontName', 'Times New Roman')
set(0,'DefaultAxesFontSize', 18)
A = [0 0 0 1 1;0 0 1 0 0;0 1 0 1 0;1 0 1 0 1;1 0 0 1 0]; % adjacency matrix 
G = graph(A,{'a','b','c','d','e'});
figure(1)
plot(G,'MarkerSize',7,'LineWidth',2)
D = diag(degree(G));
L = full(laplacian(G)); % Laplacian 
% L = D-A; 
[U,V]=eig(L); 
figure(2)
stem(diag(V),'b','Linewidth',4);ylabel('Eigen values'); 
figure(3)
subplot(141)
stem(U(:,1),'g','Linewidth',4);title('1st Eigen vector'); 
subplot(142)
stem(U(:,2),'k','Linewidth',4);title('2nd Eigen vector'); 
subplot(143)
stem(U(:,4),'b','Linewidth',4);title('4th Eigen vector'); 
subplot(144)
stem(U(:,5),'r','Linewidth',4);title('5th Eigen vector'); 

% Directed graph with circulant Laplacian matrix 

A1 = circulant([0 1 0 0 0 0 0 0],1); 
G1 = digraph(A1,{'a','b','c','d','e','f','g','h'});
figure(4)
plot(G1,'MarkerSize',7,'LineWidth',2)