Question: matlab Problem. (Nested for loop used in conjunction with if- else) Write a script and define a matrix [1 23 4 A=15 6 7 8
Problem. (Nested for loop used in conjunction with if- else) Write a script and define a matrix [1 23 4 A=15 6 7 8 9 10 11 12 Create a new matrix B from A such that the elements in B are twice the values in A. Use the disp function to print to the screen the name of each matrix and its elements. Lastly, create a new matrix C from B such that those elements of B with values 10 3 bij S 16 are replaced with the number 100. Print to the screen C and its elements. Remember good programming practice to pre-allocate memory for a matrix actively constructed in a for loop
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
