Line and circle Intersection
Ältere Kommentare anzeigen
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 Kommentar
Image Analyst
am 6 Dez. 2016
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().
Antworten (0)
Kategorien
Mehr zu Image Arithmetic finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!