I am working on a GUI wherein the users can input the mass, gravity and drag force and in return, it will graph the differential equation. Can you suggest any methods on how can i callback the string and put it into the equation? I tried using this:
a = str2num(get(handles.mass_second,'String')); b = str2num(get(handles.mass_gravity,'String')); c = str2num(get(handles.drag_second, 'String')); function rk= f(t,y); mass = a; gravity =b; rk= a*b - (c/a)*y; end
but it gives me the error 'Too many output arguments'. I really want to learn matlab. thanks in advance 🙂
Best Answer