Filter löschen
Filter löschen

Array as an input

1 Ansicht (letzte 30 Tage)
amateurintraining
amateurintraining am 24 Sep. 2017
Beantwortet: the cyclist am 24 Sep. 2017
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?

Antworten (1)

the cyclist
the cyclist am 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);

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by