Multiplication implementation help?
Afficher commentaires plus anciens
Hello Experts,
I need to write MATLAB code and to build a product like this:
for i from 1 to d, multiplication (x(i)-x(j)). x is a row vector of size d.
Here is what I did:
m = 0;
for i=1:d
for j=1:d
if i~=j
m = prod(x(i)-x(j));
end
end
end
But I am not sure if I am right...can you please help me with this?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Testing Frameworks 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!