필터 지우기
필터 지우기

Problem with undefined variable

조회 수: 1 (최근 30일)
Jan
Jan 2011년 11월 26일
Hi,
I'd like to construct a function Q that has a symbolic expression f(u1,u2,...,ui) as an argument.
The thing is that I don't want to declare f as being an expression of symbolic variables u1,...,ui.
I want Q to do this for me: it receives some expression with u1,...,ui (without these being defined anything) and then it declares these all as symbolic.
Is this possible?
Greets,
Jan
  댓글 수: 2
Naz
Naz 2011년 11월 26일
http://www.mathworks.com/matlabcentral/answers/22107-create-a-function-from-user-input-string
Walter Roberson
Walter Roberson 2011년 11월 26일
Right, but the solutions referenced there all require passing the expression as a string.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2011년 11월 26일
No, in order to do anything close to that, you would have to pass the expression as a string (or as a function handle, or as an inline function)

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by