How to automatically input function arguments?
조회 수: 8 (최근 30일)
이전 댓글 표시
I have to ask the user for the values of 'n'. I have two defined variables 'a' and 'b' which are vectors. I have to substitute 'a' and 'b' in the function allcomb() in a manner that 'a' occurs 'n' times followed by 'b'.
For example if n=5 then I need the value of allcomb(a, a, a, a, a, b).
For n=2, allcomb(a, a, b) is required.
How should I write a code which decides the input arguments?
Thank you.
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Argument Definitions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!