Line and circle Intersection
显示 更早的评论
I want to show the intersection of a line and a circle on axes. I get the values from user input because I am using GUI.
if true
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
axes(handles.axes1);
r = str2double(get(handles.edit3,'String'));
x_circle=str2double(get(handles.edit7,'String'));
y_circle=str2double(get(handles.edit8,'String'));
x1=str2double(get(handles.edit1,'String'));
y1=str2double(get(handles.edit2,'String'));
x2=str2double(get(handles.edit11,'String'));
y2=str2double(get(handles.edit12,'String'));
x=[x1 x2];
y=[y1 y2];
[xout,yout] = linecirc(x,y,x_circle,y_circle,r)
end
I get Inputs must be scalars as an Error.
1 个评论
Image Analyst
2016-12-6
I can tell you haven't read this: http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer or else you would have given us the error. Please read it and then tell us the whole error, not just a tiny part snipped out of it like you did. Not only that, but you forgot to give us the code for linecirc().
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!