필터 지우기
필터 지우기

Text box with a variable on one line

조회 수: 9 (최근 30일)
Emily
Emily 2014년 8월 18일
댓글: Emily 2014년 8월 18일
I'm new to matlab (formerly used LabView) I am trying to create a text box for a graph using a variable TimeStep defined above using the code below. How can I get this to appear on one line (tried strjoin but didn't get anywhere) instead of starting a new line at TimeStep and 'min means'
annotation(figure1,'textbox',[0.153 0.817 0.183 0.0815,],'String',{('Error bars are ± one standard deviation on'; num2str(TimeStep);'min means'},'FitBoxToText', 'on', 'FontSize',12,'FontName', 'Calibri')
Thanks

답변 (1개)

Adam
Adam 2014년 8월 18일
Using ; within a { } block will force a new line so try removing those and just concatenating in a [ ] block instead.
  댓글 수: 1
Emily
Emily 2014년 8월 18일
working now great thanks

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

카테고리

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