what to do so that matlab recognizes the guide script function?
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
when I do the script in the matlab guide if I use a command for example int (f, a, b) to find the area under the curve tells me that the function is not defined What should I do?
function pushbutton2_Callback(hObject, eventdata, handles)
syms
a=str2double(get(handles.edit7,'string'));
b=str2double(get(handles.edit6,'string'));
x=linspace(a,b,500);
y=get(handles.edit4,'string')
j=char(y);
z=int(j,a,b);
set(handles.edit8,'string',z)
axes(handles.axes3);
area(x,y);
grid on;
댓글 수: 0
답변 (1개)
Walter Roberson
2017년 11월 4일
편집: Walter Roberson
2017년 11월 4일
Instead of
j=char(y);
you should
j = sym(y);
Then,
area(x,y);
should be
area(x, double(subs(y)));
댓글 수: 4
Erwin Avendaño
2017년 11월 4일
Erwin Avendaño
2017년 11월 4일
Walter Roberson
2017년 11월 4일
set(handles.edit8, 'string', char(z));
Erwin Avendaño
2017년 11월 4일
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!