Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
2行の文を含む文字列を取得します:
'hello this is my first. program matlab'
そして、文をオンラインで表現するように変更したい:
'hello this is my first.program matlab'
どうすれば matlab でできますか?
\ntoの出現箇所をすべて置換''
\n
''
myNewSt = strrep(mySt,sprintf('\n'),'');
たとえば、次のように入力します。
strrep( sprintf('this is my \n string'),sprintf('\n'),'')