MATLAB Answers

less than or equal as symbol in prompt of inputdlg

조회 수: 22(최근 30일)
xena42
xena42 2 Jun 2019
댓글: xena42 2 Jun 2019
Hello :)
I'm trying to use the symbol in the prompt of my inputdlg but I can't make it work.
Here is the code:
prompt={...
sprintf('%s\n%s','some text in first line',...
'enter number (5 < x < 50):'),... % here it would be great with the <= symbol instead
sprintf('%s\n%s','smoe more text',...
'i would really appreciate your help!')};
answer=inputdlg(prompt);
I would appreciate your help!

  댓글 수: 0

로그인 to comment.

채택된 답변

Guillaume
Guillaume 2 Jun 2019
≤ is unicode U+2264, One way to insert it into text is with another sprintf:
sprintf('enter number (5 \x2264 x \x2264 50):')
You could always type <= to avoid resorting to Unicode.

  댓글 수: 1

xena42
xena42 2 Jun 2019
Thank you so much! It works perfectly :)

로그인 to comment.

추가 답변(0개)

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by