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.
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 (2025). Drawing Lp norm in 2d (https://uk.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 LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
