how to calculate the power of 2 in a symbolic expression?

1 Ansicht (letzte 30 Tage)
Marianna
Marianna am 20 Sep. 2022
Kommentiert: Star Strider am 21 Sep. 2022
s1,s2,s3 are syms
I \want to calculate the power of 2 in a symbolic expression. The 'power' and '.^' dont calculate it.

Akzeptierte Antwort

Star Strider
Star Strider am 20 Sep. 2022
Try something like this —
syms s1 s2 s3
v = 3*sqrt(5)*s1 + 27*sqrt(34)*s2 + 15*sqrt(629)*s3/17 + 3
v = 
v2 = 2^v
v2 = 
v2 = vpa(v2, 6)
v2 = 
.
  4 Kommentare
Marianna
Marianna am 21 Sep. 2022
it's correct!!! Thankss
Star Strider
Star Strider am 21 Sep. 2022
@Walter Roberson — Thank you!
@Marianna — My pleasure!
If my Answer helped you solve your problem, please Accept it!
I did not understand what you meant by ‘power of 2’.
.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by