Error using plot Conversion to double from function_handle is not possible.
显示 更早的评论
i have been trying to figure out whats happening with my code. Im trying to make a Plotter with GUI but there is a problem when it compiles just exactly at the plot command line the code is the next one:
function pushbutton1_Callback(hObject, eventdata, handles)
y=str2func(get(handles.fdy, 'String'))
x=linspace(0,100,1000);
plot(x,y)
fdy: Is the callback from the edit text where you have to insert the function Example= sin(x) As simply as that, i dont really know whats the problem it shows "Error using plot Conversion to double from function_handle is not possible." i dont know if its a variable type problem maybe i have to use str2func, but i tried and i dont know. Please help me out
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Graphics Performance 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!