フィルターのクリア

string data in function

2 ビュー (過去 30 日間)
Muhammad
Muhammad 2021 年 5 月 28 日
編集済み: Stephen23 2021 年 5 月 28 日
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 件のコメント
Stephen23
Stephen23 2021 年 5 月 28 日
編集済み: Stephen23 2021 年 5 月 28 日

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2021 年 5 月 28 日
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 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by