How to use variable?

17 Ansichten (letzte 30 Tage)
Ivor Horton
Ivor Horton am 15 Jun. 2020
Kommentiert: madhan ravi am 15 Jun. 2020
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

Akzeptierte Antwort

David Hill
David Hill am 15 Jun. 2020
syms a b c d;
det([a b;c d]);
  1 Kommentar
madhan ravi
madhan ravi am 15 Jun. 2020
First line doesn’t output anything.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by