I want to plot the p-norm in a 2 dimensional space with the condition $|x,y|_p = 1$
x = linspace(-1,1,10);
y = linspace(-1,1,10);
[xm,ym] = meshgrid(x,y);
for p=1:5
z = (abs(xm).^p + abs(ym).^p).^(1/p);
surfc(x,y,z)
hold on
end
hold off
This is my code and this is the plot from the code:
How do I limit the plot for only the case where the p-norm is equal to 1?
plot
that set in 2d for each $p$ $\endgroup$