This is the question Fill in the blanks \\????\" in the provided m-¯le to implem
ID: 1923048 • Letter: T
Question
This is the question
Fill in the blanks ????" in the provided m-¯le to implement the CORDIC function for
division. Choose appropriate values for i. Test the algorithm by computing the division of 7 by 15. turn in the table of CORDIC iterations that is displayed to the
MATLAB console.
This is matlab code
x = ???;
y = ???;
z = ???;
disp(['True value: x/y = ' num2str(x/y)])
for ii = ???:???,
d = ???;
x = ???;
z = ???;
disp([ii d x z])
end
Explanation / Answer
x = 7; y = 15; z = 0; format long a = zeros(20,3); for i = 1:20 if x > 0 x = x - y*2^(-i); z = z + 2^(-i); else x = x + y*2^(-i); z = z - 2^(-i); end a(i,:) = [i 7/15 z]; end
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.