필터 지우기
필터 지우기

Symbolic function expected 3 inputs and received 2

조회 수: 1 (최근 30일)
Usman Saleem
Usman Saleem 2021년 3월 10일
답변: Cris LaPierre 2021년 3월 10일
I want to compute the following code.
syms u(x,y,t) v(x,y,t) w(x,y,t) a1 a2 mu p(x,y,t) r x y
I=[1,0;0,1];
VV = [diff(u,x),diff(v,x);diff(u,y),diff(v,y)];
A1 = VV+transpose(VV);
A2 = diff(A1,t)+A1*VV+transpose(VV)*A1;
T = -p*I+mu*A1+a1*A2+a2*(A1)^2;
ANS1 = 1/r*(diff(T(1,1),x)+diff(T(1,2),y))
but gets the following error:
Error using symfun/subsref (line 141)
Symbolic function expected 3 inputs and received 2.
Error in as1 (line 27)
ANS1 = 1/r*(diff(T(1,1),x)+diff(T(1,2),y))
Need guidance!

채택된 답변

Cris LaPierre
Cris LaPierre 2021년 3월 10일
T is a defined using p(x,y,t). This causes T to also be a function with the same 3 inputs.
However, when you call T in your calculation of ANSI, you use T(1,1) and T(1,2). There are only 2 inputs when 3 were expected.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by