フィルターのクリア

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 Center および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by