未定义与 'double' 类型的输入参数相对应的函数 'int'。

caicai0529 2018-07-02 04:56:54
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
syms x a b m n;
a = str2num(get(handles.edit1,'String'));
b = str2num(get(handles.edit2,'String'));
% a and b are variables of Strings type, and need to be converted
% to variables of Number type before they can be added together
dx=0.01;x=a:dx:b;
m = str2num(get(handles.edit3,'String'));
n = str2num(get(handles.edit4,'String'));
f = m*x+n;
c= int(f,x,a,b);
set(handles.text5,'String',c);
plot(x,f,'r'),title('311622001002'); %加图形标题。
grid on;
xlabel('X'); ylabel('Y');
legend('y1','y2');
guidata(hObject, handles);




函数的定积分与图像的保存
任务及指标
(1)设计GUI界面;
(2)由用户在文本框中输入关于x的一维函数表达式;
(3)由用户在文本框中输入积分上限和下限;
(4)当用户点击计算按钮后,在GUI界面中画出该一维函数的图像(可以采用坐标轴对象实现),并显示积分结果。
(5)当用户点击保存按钮后,保存该函数图像。
...全文
1989 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

250

社区成员

发帖
与我相关
我的任务
社区描述
其他产品/厂家
社区管理员
  • 其他
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧