MATLAB: How to plot these functions

plotting

Hello, everyone.
I am trying to plot this function but I can not do it. I got some errors, this is the function that I have to plot. Please someone help me.
By the way, thanks.
Here you have my code:
And the command window responses:

Best Answer

I hope this isn't your homework (or else it would be unethical for you to turn this code in). You can do this:
clc; % Clear the command window.
close all;
workspace; % Make sure the workspace panel is showing.
fontSize = 20;
% Create x and y
x = linspace(0.3, 0.7, 500);
y = linspace(0.3, 0.7, 500);
% Create image
rows = length(y);
columns = length(x);
z = zeros(rows, columns);
for row = 1 : rows
thisY = y(row);
for col = 1 : columns
thisX = x(col);
if thisX > 0.3 && thisX < 0.5 && thisY > 0.3 && thisY < 0.5
z(row, col) = (10*thisX-3)*(10*thisY-3)/4;
elseif thisX > 0.3 && thisX < 0.5 && thisY > 0.5 && thisY < 0.7
z(row, col) = (10*thisX-3)*(7-10*thisY)/4;
elseif thisX > 0.5 && thisX < 0.7 && thisY > 0.3 && thisY < 0.5
z(row, col) = (7-10*thisX)*(10*thisY-3)/4;
elseif thisX > 0.5 && thisY > 0.5
z(row, col) = (7-10*thisX)*(7-10*thisY)/4;
end
end
end
imshow(z, [], 'XData', x, 'YData', y);
colorbar;
colormap(parula(256));
axis on;
xlabel('X', 'FontSize', fontSize);
ylabel('Y', 'FontSize', fontSize);