Hello, I wanted to ask if I can pass a code from MatLab to C++.
Attached MatLab code:
N=10
i_number= 78999999;
i_sqrt= i_number;
for i=1:N
i_sqrt= floor(((i_number/i_sqrt)+i_sqrt)/2);
end
Hello, I wanted to ask if I can pass a code from MatLab to C++.
Attached MatLab code:
N=10
i_number= 78999999;
i_sqrt= i_number;
for i=1:N
i_sqrt= floor(((i_number/i_sqrt)+i_sqrt)/2);
end
Could you help me to have some idea of how to solve the following exercise:
The following Matlab code allows you to recursively determine the integer part of the square root of a number. Write the equivalent assembly code and determine the approximate value of the root of 78999999, in 10, 50, 100 and 500 iterations. The results should be displayed on the console. Then determine the value N, where the closest integer value to the root of that number is obtained.
Attached code of the function in Matlab:
N = 10
i_number = 78999999;
i_sqrt = i_number;
for i = 1:N
i_sqrt = floor(((i_number / i_sqrt) + i_sqrt) / 2);
end
Thank you
I want to ask you the following question. I found the following example on the MatLab page, which I can't understand what the function does genqammod
and how the vector is defined x = []
. I don't understand what values I have to use. I leave you the following link of the example
Example: https://la.mathworks.com/help/comm/ref/genqammod.html.