How to use variable?

21 次查看(过去 30 天)
Ivor Horton
Ivor Horton 2020-6-15
If I run
det([1 2;3 4])
Matlab gives the result -2.
I want to calculate
det([a b;c d])
and how can I get the result
ad - bc

采纳的回答

David Hill
David Hill 2020-6-15
syms a b c d;
det([a b;c d]);

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by