フィルターのクリア

Convert cell array of syms to double

3 ビュー (過去 30 日間)
yonatan s
yonatan s 2020 年 10 月 19 日
コメント済み: yonatan s 2020 年 10 月 19 日
Hello, after running the following code (where f(1), f(2) are constants, and u is a vector), X ends up being a u-sized cell array where each cell is of class 'sym'. How do I convert X to double?
syms x positive
eqn = f(1)*x.^2+f(2)*x == u;
X = (arrayfun(@solve,eqn,'uniform',0));
Thanks.

採用された回答

Walter Roberson
Walter Roberson 2020 年 10 月 19 日
double([X{:}]).'
  1 件のコメント
yonatan s
yonatan s 2020 年 10 月 19 日
Thanks

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by