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!