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?

답변 (1개)

the cyclist
the cyclist 2017년 9월 24일

0 개 추천

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);

카테고리

도움말 센터File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

질문:

2017년 9월 24일

답변:

2017년 9월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by