Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
|
![]() |
#1 |
初级会员
注册日期: 2008-11-06
年龄: 36
帖子: 4
声望力: 0 ![]() |
![]()
在popupmenu的callback下的程序段:
val = get(hObject,'Value'); switch val case 1 fid3=fopen('youth.txt','rt'); s=fscanf(fid3,'%c'); fclose(fid3); set(handles.pushbutton6,'string',s); case 2 fid3=fopen('Going Home.txt','rt'); s=fscanf(fid3,'%c'); fclose(fid3); case 3 fid3=fopen('Thoughts for a new year.txt','rt'); s=fscanf(fid3,'%c'); fclose(fid3); case 4 fid3=fopen('Relish the Moment.txt','rt'); s=fscanf(fid3,'%c'); fclose(fid3); end guidata(hObject,handles); 结果在其他函数中引用‘s’无效,请教如何解决 |
![]() |
![]() |
![]() |
主题工具 | |
显示模式 | |
|
|
![]() |
||||
主题 | 主题作者 | 版面 | 回复 | 最后发表 |
[原创]哥德巴赫猜想-张俊龙请白文章教授出示结果 | 龙舞山威 | 数学 | 0 | 2009-02-06 14:36 |
求助CFR仿真,设计 | zhuoxj | MATLAB论坛 | 0 | 2008-12-29 11:06 |
Studying the World's Most Complex Dynamic Systems | TechnicalArticles | MATLAB技术文章 | 0 | 2008-08-29 00:40 |
[求助]在SIMULINK里,如何将inegrator上方的箭头移到下面去 | yijianmei | MATLAB论坛 | 1 | 2008-07-24 10:15 |
Simplify Instrument Communication: Using Instrument Drivers with the Instrument Contr | TechnicalArticles | MATLAB技术文章 | 0 | 2008-01-06 16:32 |