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

 채택된 답변

Star Strider
Star Strider 2021년 5월 28일

0 개 추천

Perhaps something like this —
data('Character Vector', pi, 42)
a = 'Character Vector'
45.1416
data("String Variable", pi, pi)
a = "String Variable"
6.2832
function data(a,b,c)
display(a);
display(b+c);
% here 'a' should be string and rest will be the numbers
end
.

추가 답변 (0개)

카테고리

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

질문:

2021년 5월 28일

편집:

2021년 5월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by