필터 지우기
필터 지우기

How to output result to static text uicontrol?

조회 수: 1 (최근 30일)
AnDron
AnDron 2012년 10월 31일
Hello. I wanna to develop GUI application for finding derivative of function.
function B_Callback(hObject, eventdata, handles)
syms x;
f=cos(x);
set(handles.Static_text1, 'String', diff(f));
But it works wrong.

답변 (1개)

Akiva Gordon
Akiva Gordon 2012년 11월 13일
This is likely not working because diff(f) is of type SYM, and the SET function is expecting a string of type CHAR. In order to do this, you can try changing the type by using this instead:
set(handles.Static_text1, 'String', char(diff(f)) );

태그

Community Treasure Hunt

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

Start Hunting!

Translated by