Symbolic Expression Error problem !

1 visualizzazione (ultimi 30 giorni)
Amit Chakraborty
Amit Chakraborty il 22 Gen 2022
Commentato: Amit Chakraborty il 22 Gen 2022
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,[]);

Risposta accettata

KSSV
KSSV il 22 Gen 2022
Modificato: KSSV il 22 Gen 2022
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,[]);

Più risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by