How Can I put some numbers in a sym and sum its cells?
Afficher commentaires plus anciens
I have the matrix [A]= [ a*(x^2)+y , b(y^3)+x ; d*(x^2)*y , c*y ].
and I have the matrix [B]=[1 2;3 4] which the first column of [B] is x and the socond culomn Of [B] is y .
I want to put x=1 and y=2 then x=3 and y=4 and sum A11. then do it for other cells.
2 commentaires
madhan ravi
le 4 Sep 2019
Modifié(e) : madhan ravi
le 4 Sep 2019
Values of c and d??
masoud jiryaei
le 4 Sep 2019
Réponse acceptée
Plus de réponses (1)
KSSV
le 4 Sep 2019
syms a b c d
B = [ 1 2 ; 3 4] ;
x = B(:,1) ;
y = B(:,2) ;
A = [ a*(x(1)^2)+y(1) , b*(y(1)^3)+x(1) ; d*(x(2)^2)*y(2) , c*y(2) ] ;
iwant = sum(A(:))
1 commentaire
masoud jiryaei
le 4 Sep 2019
Catégories
En savoir plus sur Signal Processing Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!