Question: Consider the following function a ( i , j ) = { j 3 if | i j | < 4 i + 4 j

Consider the following function a(i,j) =

{ j3 if |i j| < 4
i + 4j if |i j| 4

If we were to define a(i,j) as an anonymous function in Matlab, i.e., a=@(i,j) ... what would be the code for the '...' part of the function (using 38 characters or less)? To check your work, the code that you come up with (together with a=@(i,j)) should produce the below 77 matrix when used with the create_matrix function.

1 8 27 64 21 25 29
1 8 27 64 125 26 30
1 8 27 64 125 216 31
1 8 27 64 125 216 343
9 8 27 64 125 216 343
10 14 27 64 125 216 343
11 15 19 64 125 216 343

Note: Do not include the 'a = @(i,j)' part of the function in the answer box.

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!