what to do so that matlab recognizes the guide script function?
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
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;
Antworten (1)
Walter Roberson
am 4 Nov. 2017
Bearbeitet: Walter Roberson
am 4 Nov. 2017
Instead of
j=char(y);
you should
j = sym(y);
Then,
area(x,y);
should be
area(x, double(subs(y)));
4 Kommentare
Erwin Avendaño
am 4 Nov. 2017
Erwin Avendaño
am 4 Nov. 2017
Walter Roberson
am 4 Nov. 2017
set(handles.edit8, 'string', char(z));
Erwin Avendaño
am 4 Nov. 2017
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!