i have a function which has 2 variables each of these variables are a vector. how do i pass vector inputs to the function???

 채택된 답변

Birdman
Birdman 2018년 2월 8일

3 개 추천

function z=f(x,y)
z=x.^2+y.^2;
end
From command line, type
x=[1;2];y=[3;4]
z=f(x,y)
and the result would be
[10;20]

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

질문:

2018년 2월 8일

댓글:

2019년 10월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by