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

1 次查看(过去 30 天)
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

请先登录,再进行评论。

采纳的回答

Image Analyst
Image Analyst 2019-12-30
function ut = u(handles, x, y)
ut = handles.edit11.String
evalc(ut)
end
  2 个评论
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