RE:

Hi Louise,
 
you can just transform your score (an integer variable) to a string by using MATLAB's num2str command which you can then use in DrawText. In your case it would be something like:
 
DrawText(num2str(score),windowPointer, colour, x, y)
 
(I'm not sure about the order of the other arguments, but I suppose you can figure that out yourself)
 
Best regards
Jeroen Benjamins


psychtoolbox@yahoogroups.com wrote:


Message: 1
Date: Mon, 06 Jun 2005 14:02:54 -0000
From: "louiseewhiteley"
Subject: OSX - DrawText - can you call a variable within the text argument?

Hi -

I am wanting to use DrawText to write a cumulative score onto the
screen after each trial.
This cumulative score exists as a variable inside the trial 'for
loop' in my Matlab code, but I
can't see any way to insert a variable in the 'text' argument of
DrawText... Is this possible,
and if not does anyone know of another way that I could achieve this?

thanks,

Louise.

Wellcome Neuroscience PhD student
University College London



Jeroen Benjamins - A.B.C.-straat 10 bis - 3512 PX Utrecht 
Tel. 030-2311385 Mob. 06-44292537
Mail: mail@... / j.s.benjamins@...
URL: http://www.jsbenjamins.nl
=====================================
People like you and I, though mortal of course like
everyone else, do not grow old no matter how long
we live...[We] never cease to stand like curious
children before the great mystery into which we
were born.

- Albert Einstein -
=====================================


How much mail storage do you get for free? Yahoo! Mail gives you 1GB!
Get Yahoo! Mail