how do I write 2^-x in MatLab?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I need to run a algorithm where 2^(-x) is included.
0 Kommentare
Antworten (2)
Fangjun Jiang
am 17 Feb. 2023
x=1;
2^(-x)
1 Kommentar
John D'Errico
am 17 Feb. 2023
Bearbeitet: John D'Errico
am 17 Feb. 2023
The parens are not technically needed there, but they don't hurt anything.
x = 1;
2^-x
And to be honest, I usually put a parens in something like that myself just to make it easier to read. Sometimes spare parens make things more clear, and sometimes they just create a confusing mess, creating a parenthetical balancing act.
Siehe auch
Kategorien
Mehr zu Web Services finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
