したがって、これに対する私のコードは次のとおりです。
my5Sentences={'Windows machines are better than Macs.','The Intel core i7 4770k is a great processor.','My email is rjoshi8@drexel.edu','I go to Drexel','I am writing this in MATLAB & and I am writing this code for Engr-180'};
for i=1:length(my5Sentences)
fprintf('The total number of characters in this sentence is %i\n',length(my5Sentences{i}))
end
コードのこの部分は、各文に含まれる文字数を表示しますが、ここで、各文に含まれる特殊文字の数を調べる必要があります。このコードがどのようになるかはわかりません。ところで、最初の質問を手伝ってくれた PearsonArtPhoto に感謝します。