how can I convert a string to an expression which "symvar" can search for identifiers?
조회 수: 1 (최근 30일)
이전 댓글 표시
how can I convert a string to an expression which "symvar" can search for identifiers?
I use this: symvar 'cos(pi*x - beta1)'
ans =
'beta1'
'x'
and it works, but when I use this:
insertfunction='cos(pi*x - beta1)'
symvar insertfunction
it doesn't have the same results. How can I make it?
댓글 수: 0
채택된 답변
추가 답변 (1개)
Ivan van der Kroon
2011년 6월 7일
insertfunction='cos(pi*x - beta1)'
>> symvar(insertfunction)
ans =
'beta1'
'x'
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!