How to use variable?

16 visualizzazioni (ultimi 30 giorni)
Ivor Horton
Ivor Horton il 15 Giu 2020
Commentato: madhan ravi il 15 Giu 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

Risposta accettata

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

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by