필터 지우기
필터 지우기

how can i take the values from edit_text of gui to function

조회 수: 1 (최근 30일)
esat gulhan
esat gulhan 2019년 12월 30일
댓글: Image Analyst 2019년 12월 31일
I am writing a program for fluid kinematics. It is working, but i want to show in matlab gui.
function ut=u(x,y);
ut=3*x+y
end
it accepts
function ut=u(x,y);
ut=(get(handles.edit11,'String'))
end
but it does not accept it.
i want to get values from edit_text. Can you help for this?
  댓글 수: 3
esat gulhan
esat gulhan 2019년 12월 30일
It says "Undefined variable "handles" or class "handles.ugui"." when i put
Jason
Jason 2019년 12월 30일
Put handles as an argument in your function.

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2019년 12월 30일
function ut = u(handles, x, y)
ut = handles.edit11.String
evalc(ut)
end
  댓글 수: 2
Jason
Jason 2019년 12월 31일
Shouldn't there be a get ...
get(handles.edit11,'String')
Image Analyst
Image Analyst 2019년 12월 31일
No - that's the old fashioned way - pre release 2014b. The newer way is like the object oriented programming (OOP) way that all modern languages use now. I'm using the new/current OOP way.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

esat gulhan
esat gulhan 2019년 12월 31일
It is definetly good way. (practical). it works...thanks

카테고리

Help CenterFile Exchange에서 Text Data Preparation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by