Question: Matlab I need the code Write a Script file run divisiblity_check.m. Run a for loop from 1 to 100 with an increment of divisible by

 Matlab I need the code Write a Script file "run divisiblity_check.m.
Matlab
I need the code

Write a Script file "run divisiblity_check.m. Run a for" loop from 1 to 100 with an increment of divisible by 2, 3, both or neither. rem) command in variable when divided by a particular number. For instance, if x-3, rem(x, 2) would return I and if x 2, rem(x, 2) would be 0. Do a help on rem 0 command if you need more details and use it accordingly for the problem in hand. Results from I to 30 is shown in Figure 1. Note: You have to implement the code for numbers from 1 to 100. I and using if-else statements print whether the current number in the loop is MATLAB tells the remainder of a 1 is not divisible by 2 or 2 is divisible by 2 3 is divisible by 3 4 is divisible by 2 5 is not divisible by 2 or 3 6 is divisible by 2 and 3 7 is not divisible by 2 or 3 8 is divisible by 2 9 is divisible by 10 is divisible by 2 11 is not divisible by 2 or 3 12 is divisible by 2 and 13 is not divisible by 2 or 3 14 is divisible by 2 15 is divisible by 3 16 is divisible by 2 17 is not divisible by 2 or 3 18 is divisible by 2 and 3 19 is not divisible by 2 or 3 20 is divisible by2 21 is divisible by 3 22 is divisible by 2 23 is not divisible by 2 or 3 24 is divisible by 2 and 3 25 is not divisible by 2 or 3 26 is divisible by 2 27 is divisible by 3 28 is divisible by 2 29 is not divisible by 2 or 3 30 is divisible by 2 and 3 Figure 1: Results from 1-30 Write a Script file "run divisiblity_check.m. Run a for" loop from 1 to 100 with an increment of divisible by 2, 3, both or neither. rem) command in variable when divided by a particular number. For instance, if x-3, rem(x, 2) would return I and if x 2, rem(x, 2) would be 0. Do a help on rem 0 command if you need more details and use it accordingly for the problem in hand. Results from I to 30 is shown in Figure 1. Note: You have to implement the code for numbers from 1 to 100. I and using if-else statements print whether the current number in the loop is MATLAB tells the remainder of a 1 is not divisible by 2 or 2 is divisible by 2 3 is divisible by 3 4 is divisible by 2 5 is not divisible by 2 or 3 6 is divisible by 2 and 3 7 is not divisible by 2 or 3 8 is divisible by 2 9 is divisible by 10 is divisible by 2 11 is not divisible by 2 or 3 12 is divisible by 2 and 13 is not divisible by 2 or 3 14 is divisible by 2 15 is divisible by 3 16 is divisible by 2 17 is not divisible by 2 or 3 18 is divisible by 2 and 3 19 is not divisible by 2 or 3 20 is divisible by2 21 is divisible by 3 22 is divisible by 2 23 is not divisible by 2 or 3 24 is divisible by 2 and 3 25 is not divisible by 2 or 3 26 is divisible by 2 27 is divisible by 3 28 is divisible by 2 29 is not divisible by 2 or 3 30 is divisible by 2 and 3 Figure 1: Results from 1-30

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!