How to create function handle with matrix inputs, vector output?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
ejk
le 6 Août 2020
Réponse apportée : madhan ravi
le 6 Août 2020
I am trying to create a function:
FCN = @(x) x(1) + x(2);
that will accept matrix inputs and spit out a vector of values.
Ie. if the input is:
in=[1 2; 3 4], FCN(in)
the output should be: [3 7]
Is there any way of doing this? Right now, the function is only returning the sum of the first column.
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Parallel Computing Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!