Chinese text using the Screen function of Psychtoobox

2 ビュー (過去 30 日間)
william
william 2013 年 11 月 14 日
コメント済み: william 2014 年 4 月 2 日
Hello my name is William and I am using MATLAB version R2013a(8.1.0.604)x64 on a mac OX 10.8.5 english version. I am unable to use the command Screen of Psychtoolbox version 3 for displaying Chinese characters. could somebody help me to sort out this problem. The Psychtool demo of Screen uses Japanese text but I can not make it work for chinese text. thanks in advance

回答 (2 件)

william
william 2014 年 4 月 2 日
I put in the beginning of my function this: Screen('Preference', 'TextEncodingLocale',''); and I could display the Chinese characters
and when displaying the characters: Screen('DrawText', w, double(我),sze(i,1)+(charsz*2),sze(i,2), rectx2); DrawFormattedText(w, double(我),sze(i,1)+(charsz*2),sze(i,2)); sze 1 and 2 were the dimensions of the screen from rect and rectx2 is a matrix with the color information
If any further comment, probably I could help you
Now I am trying to get through this function [status,message] = system('say 你好'), how to make matlab speaking Chinese... any idea?

Anandakumar Selvaraj
Anandakumar Selvaraj 2014 年 2 月 27 日
Try this in your code
feature('DefaultCharacterSet', 'UTF8') %# for all Character support
Note:- that UTF-8 can be used for all languages and is the recommended charset on the Internet.
  1 件のコメント
william
william 2014 年 4 月 2 日
After setting feature('DefaultCharacterSet', 'UTF-8')
[status,message] = system('say "你好"') the sound of this string is not accurate, any suggestion?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeTiming 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