MATLAB: How do i use for loop to fine determinant of Vandermonde matrix

det

how do i use for loop to fine determinant of Vandermonde matrix?

Best Answer

Let V be an n-by-n Vandermonde matrix.
d = 1;
for k = 1:n-1
d = d*prod(V(k+1:n,2)-V(k,2));
end % <-- At exit d equals det(V)
This might give you greater accuracy for this special kind of matrix than using 'det'. See
http://en.wikipedia.org/wiki/Vandermonde_matrix
Related Question