onstate instructurecomcourses1621988quizzes2372423takequesti
onstate instructure.com/courses/1621988/quizzes/2372423/take/questions/4712366s You don\'t need to call clear/cic/cif If you can\'t write the MATLAB code, at least write out the pseudo code. Comments are not required, but you may use them to clarify what you were trying to do. Unless explicitly stated otherwise stated, assume acalculate\" means write a MATLAB program to calculate the answer; do not calculate by hand. Output means what shows up in the command window Do Question 11 4 pts Write a MATLAB script that first asks the user to input a number. The script then keeps dividing the number by 10 until the result is between -1 and 1. Print out the number of divisions needed and the resulting value of the number. I e., if the user input 99.0, the output would be \"Needed 2 divisions and the resulting number is 0.99\" Your script should work for negative numbers as well as positive Ones HTML Editor Font Sizes
Solution
num = input(\"Please enter a number\");
if(num<0)
num=num*-1;
end
count=0;
while(num>=1)
num = num/10.0;
count=count+1;
end
disp(count);
