string data in function
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Muhammad
am 28 Mai 2021
Bearbeitet: Stephen23
am 28 Mai 2021
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 Kommentar
Akzeptierte Antwort
Star Strider
am 28 Mai 2021
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!