What can I use as a Plus or Minus sign?

In this equation I can't figure out how to make the + into a plus or minus sign to get both answers other than doing it twice with s1 and s2 instead of s.
s=(-800/(2*.1))+(sqrt(((800/(.1*2))^2)-(1/(.1*.000001))));

 Réponse acceptée

Joseph Cheng
Joseph Cheng le 22 Sep 2015

1 vote

s=(-800/(2*.1))+[1 -1]*(sqrt(((800/(.1*2))^2)-(1/(.1*.000001))))

Plus de réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by