clear; close all; anfis_ap1 writefis(fismat1,'fzy3'); % 將 anfis_ap1.m 學習後的模糊推論矩陣,寫成 fzy3.fis 檔案 fzy2_mat=readfis('fzy3') % 將fzy3.fis 給 fzy2.mdl 中的模糊控制方塊 sim('fzy2'); % 執行 fzy2.mdl figure subplot(311); plot(t,input1); xlabel('time(sec)') ylabel('input1'); axis([0 10 0 2]); grid on subplot(312); plot(t,input2); xlabel('time(sec)') ylabel('input2') axis([0 10 0 2]); grid on subplot(313); plot(t,output); xlabel('time(sec)') ylabel('output') axis([0 10 0 2]); grid on