亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? caishuzi.m

?? 用MATLAB編寫的一個(gè)猜數(shù)字游戲 就是隨機(jī)生成4位數(shù)
?? M
字號(hào):
function varargout = caishuzi(varargin)%CAISHUZI M-file for caishuzi.fig%      CAISHUZI, by itself, creates a new CAISHUZI or raises the existing%      singleton*.%%      H = CAISHUZI returns the handle to a new CAISHUZI or the handle to%      the existing singleton*.%%      CAISHUZI('Property','Value',...) creates a new CAISHUZI using the%      given property value pairs. Unrecognized properties are passed via%      varargin to caishuzi_OpeningFcn.  This calling syntax produces a%      warning when there is an existing singleton*.%%      CAISHUZI('CALLBACK') and CAISHUZI('CALLBACK',hObject,...) call the%      local function named CALLBACK in CAISHUZI.M with the given input%      arguments.%%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one%      instance to run (singleton)".%% See also: GUIDE, GUIDATA, GUIHANDLES% Edit the above text to modify the response to help caishuzi% Last Modified by GUIDE v2.5 08-Mar-2008 22:02:40% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name',       mfilename, ...                   'gui_Singleton',  gui_Singleton, ...                   'gui_OpeningFcn', @caishuzi_OpeningFcn, ...                   'gui_OutputFcn',  @caishuzi_OutputFcn, ...                   'gui_LayoutFcn',  [], ...                   'gui_Callback',   []);if nargin && ischar(varargin{1})   gui_State.gui_Callback = str2func(varargin{1});endif nargout    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});else    gui_mainfcn(gui_State, varargin{:});end% End initialization code - DO NOT EDIT% --- Executes just before caishuzi is made visible.function caishuzi_OpeningFcn(hObject, eventdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject    handle to figure% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% varargin   unrecognized PropertyName/PropertyValue pairs from the%            command line (see VARARGIN)% Choose default command line output for caishuzihandles.output = hObject;handles.source = rand4;   %生成一個(gè)隨機(jī)的四位數(shù)handles.pc = 0;           %用來保存按‘ok’鍵的次數(shù),但不成功% Update handles structureguidata(hObject, handles);% UIWAIT makes caishuzi wait for user response (see UIRESUME)% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.function varargout = caishuzi_OutputFcn(hObject, eventdata, handles)% varargout  cell array for returning output args (see VARARGOUT);% hObject    handle to figure% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Get default command line output from handles structurevarargout{1} = handles.output;function edit_input_Callback(hObject, eventdata, handles)% hObject    handle to edit_input (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit_input as text%        str2double(get(hObject,'String')) returns contents of edit_input as a doublehandles.instr = str2double(get(hObject,'String'));   %從編輯框取輸入值guidata(hObject, handles);% --- Executes during object creation, after setting all properties.function edit_input_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit_input (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');end% --- Executes on button press in pushbutton_clo.function pushbutton_clo_Callback(hObject, eventdata, handles)% hObject    handle to pushbutton_clo (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)delete(handles.figure1)    %關(guān)閉界面% --- Executes on selection change in popupmenu.function popupmenu_Callback(hObject, eventdata, handles)% hObject    handle to popupmenu (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: contents = get(hObject,'String') returns popupmenu contents as cell array%        contents{get(hObject,'Value')} returns selected item from popupmenuhandles.bushu = get(hObject,'value');   %獲得指定步數(shù)限制,還未完成該功能% --- Executes during object creation, after setting all properties.function popupmenu_CreateFcn(hObject, eventdata, handles)% hObject    handle to popupmenu (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: popupmenu controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');end% --- Executes on button press in pushbutton_ok.function pushbutton_ok_Callback(hObject, eventdata, handles)% hObject    handle to pushbutton_ok (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)A = handles.source;                %A為生成的隨機(jī)4位數(shù)instr = handles.instr;             %輸入的4位數(shù)handles.pc = handles.pc + 1;       %按鍵次數(shù)b = 0;  %將輸入的4位數(shù)拆開,組成矩陣B                           for i=1:4                              B(5-i) = mod(instr,10);    for j=1:4        if isequal(B(5-i),A(j))    %判斷B與A是否有相同元素,并將其個(gè)數(shù)存入b            b=b+1;        end    end    instr = fix(instr/10);end%判斷輸入是否合法f=0;                               for i=1:4    C(1:4)=B(i);    if sum(C==B)>=2        set(handles.text_rez, 'string','請(qǐng)重新輸入4位不重復(fù)數(shù)!');        f=1;        break    endendif f==0        %輸入合法a=sum(A==B);   %A與B的元素及其位置均相同的元素個(gè)數(shù)b = b - a;     %A與B的元素相同但位置不相同的元素個(gè)數(shù)set(handles.text_rez, 'string',['第',num2str(handles.pc),'步: ',num2str(B),'     ',...   num2str(a),'A',num2str(b),'B']);     %顯示步驟及結(jié)果end    % --- Executes on button press in pushbutton_reset.function pushbutton_reset_Callback(hObject, eventdata, handles)% hObject    handle to pushbutton_reset (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)handles.source = rand4;       %重新生成一個(gè)隨機(jī)4位數(shù)guidata(hObject, handles);% --- Executes on button press in pushbutton_ans.function pushbutton_ans_Callback(hObject, eventdata, handles)% hObject    handle to pushbutton_ans (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)set(handles.text_rez, 'string',['正確答案: ',num2str(handles.source)]);    %顯示正確答案%定義生成隨機(jī)4位數(shù)的函數(shù)function Y=rand4()M=randperm(10);M(find(M==10))=0;Y=M(1:4);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一二三区不卡| 韩国v欧美v日本v亚洲v| 在线看不卡av| 亚洲成人黄色小说| 91精品婷婷国产综合久久性色 | 欧美日韩专区在线| 亚洲成人精品影院| 日韩写真欧美这视频| 精品一区二区日韩| 国产精品亲子伦对白| 不卡的电影网站| 一区二区三区高清不卡| 91精品国产欧美一区二区| 久色婷婷小香蕉久久| 久久久久亚洲蜜桃| 色综合久久天天综合网| 午夜视频在线观看一区| 精品国一区二区三区| caoporm超碰国产精品| 亚洲国产一区在线观看| 精品三级在线看| 成人国产在线观看| 偷拍日韩校园综合在线| 久久影院午夜片一区| 成人av网在线| 日韩电影一区二区三区四区| 久久你懂得1024| 在线观看免费亚洲| 国内外成人在线| 一区二区三区视频在线观看| 精品日本一线二线三线不卡| av电影天堂一区二区在线| 视频一区视频二区中文| 国产人成一区二区三区影院| 欧美中文字幕亚洲一区二区va在线 | 精品国产一二三区| 97久久超碰国产精品| 日本女人一区二区三区| 国产精品私人影院| 欧美一级国产精品| 色综合久久久久| 国产一区二区三区高清播放| 亚洲一区二区三区在线播放| 久久久久久久久久久久久夜| 在线视频一区二区三区| 国产精品1区2区| 日韩电影在线看| 亚洲制服欧美中文字幕中文字幕| 久久久国产综合精品女国产盗摄| 欧美日韩三级一区二区| av高清久久久| 国产福利一区二区三区视频在线 | 91视频观看视频| 国产一区二区免费在线| 日本视频一区二区三区| 一区二区久久久久久| 欧美高清在线一区| 精品国产电影一区二区| 欧美精品视频www在线观看 | 欧美mv和日韩mv的网站| 欧美另类变人与禽xxxxx| 91色porny在线视频| 国产成人一级电影| 国产一区视频导航| 蜜桃一区二区三区四区| 亚洲成人自拍一区| 一区二区日韩av| 亚洲天堂网中文字| 国产精品美女久久久久久 | 久久久久97国产精华液好用吗| 欧美日韩aaaaaa| 欧亚一区二区三区| 在线观看网站黄不卡| 成人动漫在线一区| 成人av第一页| 成人深夜在线观看| 成人美女视频在线看| 成人美女视频在线看| 成人午夜激情在线| 波多野结衣在线一区| 成人爱爱电影网址| 99视频国产精品| 91丨porny丨首页| 色噜噜狠狠成人网p站| 色婷婷狠狠综合| 欧美日韩一区中文字幕| 欧美色爱综合网| 欧美精品1区2区3区| 欧美一区二区三区在线视频| 欧美精品国产精品| 日韩欧美美女一区二区三区| 日韩欧美一级二级| 久久久久久久网| 国产精品日韩精品欧美在线| 国产精品传媒在线| 一区二区免费视频| 日本免费新一区视频| 久久草av在线| 成人一区二区在线观看| 91碰在线视频| 欧美丰满嫩嫩电影| 2020国产成人综合网| 国产精品网站一区| 亚洲夂夂婷婷色拍ww47| 免费精品视频最新在线| 国产酒店精品激情| 91一区二区在线观看| 欧美精品成人一区二区三区四区| 日韩你懂的在线观看| 国产肉丝袜一区二区| 一区二区三区在线观看国产 | 欧美一区二区女人| 国产亚洲精品精华液| 日韩美女久久久| 日本在线播放一区二区三区| 国产精品亚洲а∨天堂免在线| 波多野结衣91| 欧美一区二区三区婷婷月色| 国产欧美日本一区视频| 亚洲一区二区精品视频| 韩国精品主播一区二区在线观看 | 欧美不卡在线视频| 亚洲天堂a在线| 日日夜夜免费精品| 国产精品1区2区3区在线观看| 色8久久精品久久久久久蜜 | 欧美视频一区二| 久久久久久久久免费| 亚洲一区二区三区四区不卡| 国产一区在线观看麻豆| 欧美日韩中文国产| 亚洲国产精品精华液2区45| 午夜免费久久看| jizz一区二区| 精品国产一区久久| 五月天婷婷综合| 91香蕉视频污在线| 国产亚洲欧洲997久久综合| 国产寡妇亲子伦一区二区| 91福利国产精品| 中文一区一区三区高中清不卡| 日本不卡在线视频| 在线视频一区二区三| 国产精品污www在线观看| 麻豆成人在线观看| 欧美裸体一区二区三区| 亚洲免费高清视频在线| 岛国av在线一区| 久久女同精品一区二区| 美女在线观看视频一区二区| 欧美亚洲综合网| 综合分类小说区另类春色亚洲小说欧美| 老司机精品视频一区二区三区| 欧美日韩免费不卡视频一区二区三区| 国产精品人妖ts系列视频| 国产一区二区三区在线观看免费 | 日韩免费性生活视频播放| 亚洲国产综合色| 色中色一区二区| 日韩美女视频一区| 成年人午夜久久久| 欧美激情中文不卡| 粉嫩一区二区三区在线看| 久久午夜色播影院免费高清| 久久电影国产免费久久电影| 欧美一区二区三区免费观看视频| 亚洲444eee在线观看| 欧美日韩久久久一区| 一区二区免费在线播放| 欧洲精品一区二区三区在线观看| 成人欧美一区二区三区黑人麻豆| 风间由美一区二区av101| 久久久久99精品一区| 国产99久久久国产精品免费看| 国产日韩欧美制服另类| 丁香亚洲综合激情啪啪综合| 中文在线资源观看网站视频免费不卡| 久久综合九色综合欧美亚洲| 狠狠色综合色综合网络| 不卡免费追剧大全电视剧网站| 国产精品人成在线观看免费| 不卡一区中文字幕| 一区二区三区四区不卡在线| 欧美亚洲一区三区| 日韩高清不卡在线| 精品欧美一区二区在线观看| 激情综合网av| 国产精品免费观看视频| 色欲综合视频天天天| 亚洲123区在线观看| 日韩欧美成人一区| 国产成人午夜电影网| 亚洲品质自拍视频| 91精品中文字幕一区二区三区| 美女网站色91| 国产精品色婷婷| 欧美午夜片在线观看| 国产一区二区三区四| 综合激情成人伊人| 欧美一级专区免费大片|