フィルターのクリア

More non-singleton rhs dimensions than non-singleton

1 回表示 (過去 30 日間)
Philosophaie
Philosophaie 2013 年 6 月 28 日
??? Assignment has more non-singleton rhs dimensions than non-singleton subscripts.
Error in ==> EigenValuesVectors4x4ToTensor at 16
f(i,k,r)=(T(i,k)-L(r)*I)*A(r,k)
I=[1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1]
T=[T11 T12 T13 T14; T21 T22 T23 T24; T31 T32 T33 T34; T41 T42 T43 T44]
A=[A11 A12 A13 A14; A21 A22 A23 A24; A31 A32 A33 A34; A41 A42 A43 A44]
L=[L1; L2; L3; L4]
f=(zeros(4,4,4))
for r=1:4
for k=1:4
for i=1:4
f(i,k,r)=(T(i,k)-L(r)*I)*A(r,k)
end
end
end
  1 件のコメント
Jan
Jan 2013 年 6 月 28 日
What is "I"?

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2013 年 6 月 28 日
Your "I" is an array, so L(r)*I is an array, and (T(i,k)-L(r)*I) is too, and so (T(i,k)-L(r)*I)*A(r,k) is going to be an array. You are trying to store that entire array into the single location f(i,k,r)
Perhaps you should be indexing "I" as well.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by