This is how the function looks like:
function [M, Eigenvalues, Eigenvectors] = Tridiagonal_matrix(N, d, k)if N>=2 && N<=10 M=full(gallery('tridiag', N, -k, d, -k)); [Eigenvalues, Eigenvectors] = eig(M);else disp('N value is invalid')end
erroefunction
function [M, Eigenvalues, Eigenvectors] = Tridiagonal_matrix(N, d, k)if N>=2 && N<=10 M=full(gallery('tridiag', N, -k, d, -k)); [Eigenvalues, Eigenvectors] = eig(M);else disp('N value is invalid')end
Best Answer