write a for loop that doubles the elements that are positive and are divisible by 3 or 5, and raises to the power of 3 the elements that are negative, but greater than -5 in matlab in matlab
main.m
% Create an example arrayarr = [-6, 2, 8, -2, 6, 11, -4, 7, -8, 5];
% Loop through all elements of the arrayfori = 1:length(arr)
% Check if the element is positive and divisible by 3 or 5if arr(i) > 0 && mod(arr(i),3)==0 || mod(arr(i),5)==0 arr(i) = arr(i)*2; % Double the element% Check if the element is negative and greater than -5elseif arr(i) < 0 && arr(i) > -5 arr(i) = arr(i)^3; % Raise to the power of 3endend% Display the modified arraydisp(arr)