Abstract
Keywords
Citation Yao Qing-sheng.P 范数单位圆的绘制 --Matlab.FUTURE & CIVILIZATION Natural/Social Philosophy & Infomation Sciences,20240509. https://yaoqs.github.io/20240509/p-fan-shu-dan-wei-yuan-de-hui-zhi-matlab/

转载自 P 范数单位圆的绘制–matlab

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%--------------------------------------------------------%
%----------不同范数的单位圆-------------------------------%
%----------aresmiki,southwest jiaotong university -------%
%-----------2016/12/7-----------------------------------%
% Given a vector space V over a subfield F of the complex numbers, a norm on V is a function p: V → R with the following properties:[1]
%
% For all a ∈ F and all u, v ∈ V,
%
% p(av) = |?a?| p(v), (absolute homogeneity or absolute scalability).
% p(u + v) ≤ p(u) + p(v) (triangle inequality or subadditivity).
% If p(v) = 0 then v is the zero vector (separates points).
% By the first axiom, absolute homogeneity, we have p(0) = 0 and p(?v) = p(v), so that by the triangle inequality
%
% p(v) ≥ 0 (non-negativity).
%
clc
clear all
r=1; %定义单位圆半径,一般范数单位圆定义为1
x=-1:0.001:1;
%y=-1:0.001:1;
pnorm=1;

p=[0.3,0.5,1,2,3,4,5,6,7,8]; %p范数取值

for i=1:length(p)
y(i,:)=(r^p(i)-abs(x).^p(i)).^(1/p(i));
end

xx=repmat(x,length(p),1);

xx=[xx,-xx];
yy=[y,-y];

figure
plot(xx',yy')
axis('equal');

legend(strcat('p=',num2str(p(1))),strcat('p=',num2str(p(2))),strcat('p=',num2str(p(3))),strcat('p=',num2str(p(4))),strcat('p=',num2str(p(5))));

References