Array as an input
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have an input A into a function and I want to define the function as a 3-by-4 matrix. How do I write the input?
0 commentaires
Réponses (1)
the cyclist
le 24 Sep 2017
Define the function like this
function [out_stuff] = fa(in_stuff)
out_stuff = 2*in_stuff; % Or whatever
end
Call it like this:
A = rand(3,4);
outA = fa(A);
0 commentaires
Voir également
Catégories
En savoir plus sur Matrices and Arrays 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!