solving simple equations in matlab
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have 2 variables:
d1 = 1:5;
d2 = 6:10;
I would like to calculate 'dat', which is given by:
dat = d1./(10.*d2);
However, the following returns a vector (as expected), how would I write this so that matlab returns a matrix i.e. the value for dat when d1 is 1:5 when d2 is 6 and then when d2 is 7, ultimately returning a 5x5 matrix. Is the only method of completing this through a loop.
0 commentaires
Réponse acceptée
Andrei Bobrov
le 19 Déc 2012
Modifié(e) : Andrei Bobrov
le 19 Déc 2012
dat = d1.'*(.1./d2);
0 commentaires
Plus de réponses (2)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!