Info

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

Make gui for function CROSSIT

1 回表示 (過去 30 日間)
Zaenal Alamsyah
Zaenal Alamsyah 2020 年 2 月 5 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I want to make simple GUI for function CROSSIT, and already have function from https://www.sfu.ca/~ssurjano/Code/crossitm.html ,
this is my GUI test.png
and it is my crossit.m code, i want result from 'y' to result coloum. i was set handles but have problem like this :
Screenshot_1.png
this code :
function staropbutton_Callback(hObject, eventdata, handles)
angkax1 = str2num (get(handles.x1,'string'));
angkax2 = str2num (get(handles.x2,'srting'));
xx = [angkax1,angkax2]
x1 = xx(1);
x2 = xx(2);
fact1 = sin(x1)*sin(x2);
fact2 = exp(abs(100 - sqrt(x1^2+x2^2)/pi));
y = -0.0001 * (abs(fact1*fact2)+1)^0.1;
hasil=num2string(y);
set(handles.result,'string',hasil);

回答 (1 件)

Jakob B. Nielsen
Jakob B. Nielsen 2020 年 2 月 5 日
Try to read your error. "There is no 'srting' property of the 'uicontrol' class."
Does that look right to you? Its a simple typing error, and it gives you the line at which the error occurs. Type 'string' instead of 'srting', and then take the time to look at your errors yourself, first :)

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

Community Treasure Hunt

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

Start Hunting!

Translated by