Symbolic Expression Error problem !
2 ビュー (過去 30 日間)
古いコメントを表示
I have two codes. one is with the numeric value and another code with the sysmbolic value. But both of them are same logic.
Any kind of suggestion or solution would be helpful for me. Thanks in Advance!
%% Numeric Value Code
FFF = rand(8,2);
TTT = rand(2,2);
FFF = reshape(FFF, 4, 2, []);
TTT = reshape(TTT, 1, 2, []);
Result_FRD = reshape(FFF .* TTT, 4*2,[]) ;
%% Symbolic Expression Code
FFF = sym('FF',[8 2]) ;
TTT = sym('TT',[2 2]) ;
TTT = reshape(TTT, 1, 2, []);
FFF = reshape(FFF, 4, 2, []);
RRR = reshape(FFF .* TTT, 4*2,[]);
ERROR I am Having ::::::::
Error using symengine
Array sizes must match.
Error in sym/privBinaryOp (line 1034)
Csym = mupadmex(op,args{1}.s, args{2}.s, varargin{:});
Error in .* (line 323)
X = privBinaryOp(A, B, 'symobj::zipWithImplicitExpansion', '_mult');
Error in FD_Test (line 14)
RRR = reshape(FFF .* TTT, 4*2,[]);
0 件のコメント
採用された回答
KSSV
2022 年 1 月 22 日
編集済み: KSSV
2022 年 1 月 22 日
Proceed with loop.
%% Numeric Value Code
FFF = rand(8,2);
TTT = rand(2,2);
FFF = reshape(FFF, 4, 2, []);
TTT = reshape(TTT, 1, 2, []);
Result_FRD = reshape(FFF .* TTT, 4*2,[]) ;
%% Symbolic Expression Code
FFF = sym('FF',[8 2]) ;
TTT = sym('TT',[2 2]) ;
TTT = reshape(TTT, 1, 2, []);
FFF = reshape(FFF, 4, 2, []);
%
RRR = FFF ;
for i = 1:2
RRR(:,:,i) = FFF(:,:,i).*TTT(:,:,i) ;
end
RRR = reshape(RRR, 4*2,[]);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!