フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

what to do so that matlab recognizes the guide script function?

1 回表示 (過去 30 日間)
Erwin Avendaño
Erwin Avendaño 2017 年 11 月 4 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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;

回答 (1 件)

Walter Roberson
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 件のコメント
Walter Roberson
Walter Roberson 2017 年 11 月 4 日
set(handles.edit8, 'string', char(z));
Erwin Avendaño
Erwin Avendaño 2017 年 11 月 4 日
YOU ARE A GENIOUS! ¡¡¡¡¡¡¡¡THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!1

この質問は閉じられています。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by