Please show me the appropriate script file I must create to execute the function
ID: 3552402 • Letter: P
Question
Please show me the appropriate script file I must create to execute the function! Thank you!
Explanation / Answer
function [points] = discretizeLine(p1, p2, stepsize)
dt = stepsize;i=1;
points(i,:) =p1;
while(dt<1 && dt>0)
i=i+1;
points(i,:)=(1-dt)*p1+dt*p2;
dt=dt+stepsize;
end
points(i+1,:) =p2;
end
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.