Passing char to a function?
4 ビュー (過去 30 日間)
古いコメントを表示
Hello Experts,
Consider I have function test and I am putting in char A:
test(A). How to input char without '' and inside the function to determine what char is given. After recognition to decide what sub function to do.
Thanks in advance.
0 件のコメント
採用された回答
Jan
2011 年 10 月 15 日
A strange question. Perhaps:
C = 'A';
test(C)
function test(S)
if strcmp(S, 'A')
disp('This has been an A');
end
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Language Support についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!