Question: Matlab code only please!!! Topic: Nested loops (while loop, for loop) with if, continue and break Q1. Write a code that generates a mine count

 Matlab code only please!!! Topic: Nested loops (while loop, for loop)

Matlab code only please!!!

Topic: Nested loops (while loop, for loop) with if, continue and break Q1. Write a code that generates a mine count map (the count of mines adjacent to any cell) using nested for or while loops and if statement. The code should prompt the user to input any size array containing the mine locations with 1 if mine exist and 0 otherwise. Sample inputs & outputs: Input: Output: ? ? ? ? Mines = 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 Map = 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 0 Matlab code!!!!!! Only!! Please

Commands: cle, clear, format compact, sqrt, size, length, fprintf, array indexing, max, min, sum, mean, norm, linspace, colon operator (:), array operations, matrix operations, inv, transpose (), poly, roots, polyval, conv, deconv, close, plot, xlabel, ylabel, grid, legend, input, function, , load, save, xlsread, xlswrite, if, else, elseif, end, round, rem, mod, ceil, floor, fix, for, while, continue, break Topic: Nested loops (while loop, for loop) with if, continue and break Q1. Write a code that generates a mine count map (the count of mines adjacent to any cell) using nested for or while loops and if statement. The code should prompt the user to input any size array containing the mine locations with 1 if mine exist and 0 otherwise. Sample inputs & Mines Map 10 0 1 0 1 10 10 0 1 0 1 10 Input: Output Input Output Mines- 1 1011 1 0 10 0 1 0 10101 0 Map 2 2 3 2 3 2 1 44 4 5 45 2 1 3 1 3 1 4 1 10 01 1 0

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!