how do i use sqrt when trying to code a math function

5 Ansichten (letzte 30 Tage)
Jacob
Jacob am 20 Feb. 2023
Beantwortet: Walter Roberson am 21 Feb. 2023
im trying to code:
sqrt(100^2+(.01x-(100/x))^2)
but i keep getting the invalid expression error.

Antworten (1)

Walter Roberson
Walter Roberson am 21 Feb. 2023
sqrt(100^2+(.01x-(100/x))^2)
^^
MATLAB has absolutely no implied multiplication. .01x is a syntax error, not 0.01 times x.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by