matrix multiply even and odd by different value
Afficher commentaires plus anciens
Hi, given a matrix zj
NL=4;NV=6;xiz=0.011e-3;f=1;
zj=repmat((1:NL),NV,1)
Let i be the rows and j be the column elements. So I would like to multiply each element of zj by the following condition
j*xiz % when i is odd
a.*((-1)+2.*j)+(-1).*((-1)+f+j).*(2.*a+xiz) % when i is even
For clarification I've attached an image of this in maths form. Thanks,
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Resizing and Reshaping Matrices dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!