How to declare input variables as a vector?

27 views (last 30 days)
Given
function [y1,...,yN] = myfun(x1,...,xM)
In matlab is it possible that the input variable x1 is a vector?

Accepted Answer

cr
cr on 7 Sep 2021
Of course it can be a vector, a matrix or a variable of some class.
  6 Comments
Fidele Adanvo
Fidele Adanvo on 10 Sep 2021
Now I understand why my code gave an error.
Thank you

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!