How to plug individual matrix values into a formula
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Oskore Mune
il 29 Apr 2018
Modificato: Ameer Hamza
il 29 Apr 2018
I have a 50x2 matrix and I want to plug in the individual values into a formula of D=(L*W)/(L+W) and make an output matrix with answers. each row of the matrix is a pair of L and W that should go together when plugging them into the formula.
0 Commenti
Risposta accettata
Ameer Hamza
il 29 Apr 2018
Modificato: Ameer Hamza
il 29 Apr 2018
out = arrayfun(@(x, y) x*y/(x+y), A(:, 1), A(:, 2))
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!