This is the function definition for getpoints. Match each statement with its cor
ID: 3804945 • Letter: T
Question
This is the function definition for getpoints. Match each statement with its corresponding role. function [X,Y] = getpoints() ____ X = [];Y = []; _____ [x, y] = ginput(l); while ~ isempty(x) ____ X(end+1) = x; Y(end+1) = y; _____ plot (x, y, ' ko') [x,y] = ginput(1); ___ end A. Plot user's most recent point B. Append latest x-coordinate to current vector of x values C. Always use this with IF, FOR, and WHILE D. Append latest y-coordinate to current vector of y values E. Initialize empty vectors F. Function header G. Collect first point from user H. Continue until user hits ENTER I. Collect next point from userExplanation / Answer
Ans)
F = function header
E = initialize empty vectors
G = collect first point fro user
C =always use this with if,for and while
B = append latest x-coordinate to current vector of x- values
D = append latest y-coordinate to current vector of y- values
A = plot user's most recent point
I = collect next point from user
H = continue until user hits enter
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.