image thumbnail

Drawing Lp norm in 2d

version 1.0.0 (1.42 KB) by Ronobir Sarker
This code will draw |x|_(L_p)=1 in two dimension. You can change values of p with a slider.

0 Downloads

Updated 31 Aug 2021

View License

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 (2021). Drawing Lp norm in 2d (https://www.mathworks.com/matlabcentral/fileexchange/98614-drawing-lp-norm-in-2d), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!