Array as an input
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
the cyclist
2017 年 9 月 24 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!