Drawing Lp norm in 2d

This code will draw |x|_(L_p)=1 in two dimension. You can change values of p with a slider.

You are now following this Submission

For any vector x, Lp norm of x is in two dimension is , |x|_(Lp)=(|x1|^p+|x2|^p)^(1/p);
This is very intersting to check the plot of |x|_(Lp) for different p. Tht's why I wrote this code.
for p=0, this plot is just two intersecting line.
For p=1, we get a rectangle.
For p=2, we get a circle.
As p tends to infinity out plot converges to a rectangle.

Cite As

Ronobir Sarker (2026). Drawing Lp norm in 2d (https://uk.mathworks.com/matlabcentral/fileexchange/98614-drawing-lp-norm-in-2d), MATLAB Central File Exchange. Retrieved .

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0