string data in function
조회 수: 1 (최근 30일)
이전 댓글 표시
i have following functioin
function data(a,b,c)
display(a);
display(b+c);
% here 'a' should be string and rest will be the numbers
end
i have to give values to a,b,c while calling function
so how i can
댓글 수: 1
채택된 답변
Star Strider
2021년 5월 28일
Perhaps something like this —
data('Character Vector', pi, 42)
data("String Variable", pi, pi)
function data(a,b,c)
display(a);
display(b+c);
% here 'a' should be string and rest will be the numbers
end
.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!