필터 지우기
필터 지우기

GUI Help

조회 수: 1 (최근 30일)
Sharmen
Sharmen 2011년 3월 7일
hi, i created 5 pushbuttons in my GUI figure file, and 1 static text, and i have sound file in wav format for each alphabet, let say button A until button E. If i click on Button A, it should display on static text box as "A" and play the WAV file for Alphabet A. How do put command in GUI create function ? i really need help in these section. It will very helpful it someone could help me out in this..
Thanks in advance

채택된 답변

Matt Fig
Matt Fig 2011년 3월 7일
Set the string property of the texbox in the callback for the corresponding pushbutton. For example, in the callback for the pushbutton with label A, do:
H = guidata(gcbo);
set(H.textbox1,'string','A') % Use the correct textbox handle.
  댓글 수: 2
Sharmen
Sharmen 2011년 3월 8일
thanks!! i worked!! but how do i play a wav file at the same time.. i know have to use "wavread" command?
thanks!!
Matt Fig
Matt Fig 2011년 3월 8일
Your welcome. To play a wav file, you need to load it with the command:
[Y,K] = wavread(filename);
sound(Y,K)
If you have other types of files to play, you might want to consider searching the FEX for some players:
http://www.mathworks.com/matlabcentral/fileexchange/?term=mp3

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by