Unidentified Function error when trying to solve an equation

I am simply trying to solve the equation for the variable k and every time I run the program it comes back with an unidentified variable error below is the code and the result
When I copy it into wolframalpha it comes back just fine so I know I didnt type the equation wrong.
Code
solve(2*pi*sqrt((.5*((k^2)+(((4/3)*k)^2))))==100 , k)
Result
Undefined function or variable 'k'.
Error in MitchAndrewsLab1 (line 18) solve('2*pi*sqrt((.5*((k^2)+(((4/3)*k)^2))))==100' , k)

 採用された回答

Sean de Wolski
Sean de Wolski 2013 年 1 月 10 日

0 投票

You need to define k as symbolic before the expression:
syms k
solve(etc,k)

1 件のコメント

Mitch
Mitch 2013 年 1 月 10 日
Thanks so much! I figured it was something simple like that.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Numerical Integration and Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by