필터 지우기
필터 지우기

How do you continue a string on the next line in Psychtoolbox?

조회 수: 16 (최근 30일)
August Hardie
August Hardie 2020년 4월 24일
댓글: August Hardie 2020년 4월 25일
I want my text to continue over new lines for better readability. I want it to look something like this:
DrawFormattedText(w, ['In each round of this experiment, you will see a blue circle.\n' ...
'Then after a few seconds, the blue circle will change\n' ...
'either its COLOR, SHAPE, or POSITION.\n' ...
'Your task is to press the spacebar as quickly as possible\n' ...
'once you notice the change.\n\n' ...
'Press <Return> to begin.', 'center', 'center'], [0 0 0] ) ;
However this does not work when I run my program through Psychtoolbox (which I am new to).
This will work if I write the entire text on one line with no ellipsis (...) and no brackets to concatenate the text. But then the line is ridiculously long and doesn't look good.
Please help if you know how to continue a string on the next line in Psychtoolbox

채택된 답변

per isakson
per isakson 2020년 4월 24일
The strings, 'center', 'center', are they really intended to be part of the second input argument of DrawFormattedText() ?
I guess the closing bracket, "]", should follow after 'Press <Return> to begin.'
  댓글 수: 1
August Hardie
August Hardie 2020년 4월 25일
You're awesome, I totally overlooked that I put the closing bracket in the wrong place. Thank you!!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Timing and presenting 2D and 3D stimuli에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by