フィルターのクリア

how load a Neural network file with a push button and used it in other Pushbutton callback function???

1 回表示 (過去 30 日間)
here is my code;
Plz tell me whats wrong: I am new to GUI (programming); i want to load a "net0" named varialble and use it in other callback finction "Rcrd_and_Recog".
Note: i am not using GUIDE GUI; using programming GUI.
function ASR()
figure('Name','Automatic Isolated Speech Rcognition System',.......
'Menubar','none',........
'Color',[1 1 1]);
Rcrd_and_Recog =uicontrol('Style','pushbutton',....
'Units','normalized',....
'Position',[0.75 0.75 0.20 0.05],....
'String','START',....
'Callback',@Record_Recog);
LD_net = uicontrol('Style','pushbutton',....
'Units','normalized',....
'Position',[0.75 0.65 0.20 0.05],....
'String','LOAD THE NET',....
'Callback',@load_net);
function load_net(varargin)
[file path]=uigetfile('*.mat','Select the M-file');
if ~isequal(file, 0)
L=load(fullfile(path,file));
Net=fieldnames(L);
net=Net{1};
handles.net=net;
end
function Record_Recog(varargin)
fs=16000;
y=wavrecord(1*fs,fs,1,'double');
if length(y)<1157
result=sim(net0,cat(1,y,zeros(1157-length(y),1)))
else
result=sim(net0,y)
end
end
  2 件のコメント
Daud
Daud 2012 年 11 月 28 日
Plz someone just point out where i did wrong; i am hopeless

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by