picking those matrices whose determinant is greater than 0

1 次查看(过去 30 天)
I have many matrices and I need to pick only those matrices whose determinant is greater than zero. For instance, consider the simple code which generates square matrices and evaluate its determinant. How can i display only those matrices whose determiant is greater than zero.
for i=1:5
a=rand(i)
b=det(a)
end
Any help will be appreciated.

采纳的回答

John D'Errico
John D'Errico 2019-2-20
WTP?
if b > 0
disp(a)
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

产品


版本

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by