The use of ' into a text

조회 수: 2 (최근 30일)
Alberto
Alberto 2014년 2월 3일
댓글: Alberto 2014년 2월 3일
Hello, my problem is that I am trying to export to a .txt file dates into a stave to use with Lylipond... My problem is that Lylipond uses the character ' to indicate the level of the note, for example:
c' is a Do c'' is a Do one scale higher
So, when I want to export this information into a txt file, I have to write the following:
fprintf(fid,'%s\r\n','c'');
And matlab shows me an error for the two consecutives '' .... How can I use this character into a text declaration??. Have anyone an idea?. Thank you!!!

채택된 답변

Sean de Wolski
Sean de Wolski 2014년 2월 3일
'c'''
Use two '' to indicate one inside of a string.
  댓글 수: 1
Alberto
Alberto 2014년 2월 3일
wow... thank you very much I have passed a time thinking about this. THANKS¡¡

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by