CS代考 function secondLoopProgram

function secondLoopProgram
% translation of second loop program in Ch 10 from C to Matlab
x = single(1);
y = single(2);

Copyright By PowCoder代写 加微信 powcoder

while y > 1
x = single(x/2); % divide by 2
y = single(1 + x);
n = n + 1;
fprintf(‘1 added to (2 raised to the power -%d) is %15.10e\n’, n, y)

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com