このラプラス展開を Matlab で行列式に対して実行すると、「未定義の関数または変数 'A'」が表示されます。誰かがそれを修正して実行可能にするのを手伝ってくれれば幸いです。
function value = Laplace
A=input('matrix A =');
[rows, columns] = size(A);
if rows == 2
for i = 1:rows
value = A(1,1)*A(2,2) - A(1,2)*A(2,1);
end
else
if rows==3:size(A);
for i = 1:rows
columnIndices = [1:i-1 i+1:rows];
value = value + (-1)^(i+1)*A(1,i)*...*Laplace(A(2:rows, columnIndices));
end
end
ありがとう