Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is matlab, no loops, just simple matlab please neededArray = 25 25 25 25 25

ID: 3910305 • Letter: T

Question

This is matlab, no loops, just simple matlab please

neededArray =

25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25

neededArray is a 13x11 array.

number = 50

I want to insert number to look like this:

neededArray =

25 25 25 25 25 25 25 25 25 25 25 25 25
25 50 50 50 50 50 50 50 50 50 50 50 25
25 50 50 50 50 50 50 50 50 50 50 50   25
25 50 50 50 50 50 50 50 50 50 50 50 25
25 50 50 50 50 50 50 50 50 50 50 50   25
25 50 50 50 50 50 50 50 50 50 50 50 25
25 50 50 50 50 50 50 50 50 50 50 50   25
25 50 50 50 50 50 50 50 50 50 50 50   25
25 50 50 50 50 50 50 50 50 50 50 50   25
25 50 50 50 50 50 50 50 50 50 50 50   25
25 25 25 25 25 25 25 25 25 25 25 25 25

Explanation / Answer

>> neededArray = zeros(11,13); %Create empty array
>> neededArray(:) = 25; %Fill it with 25
>>number = 50;
>> neededArray(2:10,2:12) = number;%Make all inner elements number
>> neededArray

neededArray =

25 25 25 25 25 25 25 25 25 25 25 25 25
25 50 50 50 50 50 50 50 50 50 50 50 25
25 50 50 50 50 50 50 50 50 50 50 50 25
25 50 50 50 50 50 50 50 50 50 50 50 25
25 50 50 50 50 50 50 50 50 50 50 50 25
25 50 50 50 50 50 50 50 50 50 50 50 25
25 50 50 50 50 50 50 50 50 50 50 50 25
25 50 50 50 50 50 50 50 50 50 50 50 25
25 50 50 50 50 50 50 50 50 50 50 50 25
25 50 50 50 50 50 50 50 50 50 50 50 25
25 25 25 25 25 25 25 25 25 25 25 25 25

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote