필터 지우기
필터 지우기

Convert cell array of syms to double

조회 수: 8 (최근 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{:}]).'

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Number Theory에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by